mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-16 12:12:20 +08:00
Autogenerate enum defenitions for all languages
Reviewed By: gkassabli Differential Revision: D4174263 fbshipit-source-id: 478961a8f683e196704d3c6ea1505a05c85fcb10
This commit is contained in:
committed by
Facebook Github Bot
parent
27ae04cabd
commit
ffcdf25281
@@ -10,9 +10,30 @@
|
||||
package com.facebook.csslayout;
|
||||
|
||||
public enum CSSJustify {
|
||||
FLEX_START,
|
||||
CENTER,
|
||||
FLEX_END,
|
||||
SPACE_BETWEEN,
|
||||
SPACE_AROUND,
|
||||
FLEX_START(0),
|
||||
CENTER(1),
|
||||
FLEX_END(2),
|
||||
SPACE_BETWEEN(3),
|
||||
SPACE_AROUND(4);
|
||||
|
||||
private int mIntValue;
|
||||
|
||||
CSSJustify(int intValue) {
|
||||
mIntValue = intValue;
|
||||
}
|
||||
|
||||
public int intValue() {
|
||||
return mIntValue;
|
||||
}
|
||||
|
||||
public static CSSJustify fromInt(int value) {
|
||||
switch (value) {
|
||||
case 0: return FLEX_START;
|
||||
case 1: return CENTER;
|
||||
case 2: return FLEX_END;
|
||||
case 3: return SPACE_BETWEEN;
|
||||
case 4: return SPACE_AROUND;
|
||||
default: throw new IllegalArgumentException("Unkown enum value: " + value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user