Autogenerate enum defenitions for all languages

Reviewed By: gkassabli

Differential Revision: D4174263

fbshipit-source-id: 478961a8f683e196704d3c6ea1505a05c85fcb10
This commit is contained in:
Emil Sjolander
2016-11-15 08:42:33 -08:00
committed by Facebook Github Bot
parent 27ae04cabd
commit ffcdf25281
25 changed files with 602 additions and 230 deletions
@@ -10,7 +10,26 @@
package com.facebook.csslayout;
public enum CSSDirection {
INHERIT,
LTR,
RTL,
INHERIT(0),
LTR(1),
RTL(2);
private int mIntValue;
CSSDirection(int intValue) {
mIntValue = intValue;
}
public int intValue() {
return mIntValue;
}
public static CSSDirection fromInt(int value) {
switch (value) {
case 0: return INHERIT;
case 1: return LTR;
case 2: return RTL;
default: throw new IllegalArgumentException("Unkown enum value: " + value);
}
}
}