mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-12 10:26:49 +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,7 +10,26 @@
|
||||
package com.facebook.csslayout;
|
||||
|
||||
public enum CSSMeasureMode {
|
||||
UNDEFINED,
|
||||
EXACTLY,
|
||||
AT_MOST,
|
||||
UNDEFINED(0),
|
||||
EXACTLY(1),
|
||||
AT_MOST(2);
|
||||
|
||||
private int mIntValue;
|
||||
|
||||
CSSMeasureMode(int intValue) {
|
||||
mIntValue = intValue;
|
||||
}
|
||||
|
||||
public int intValue() {
|
||||
return mIntValue;
|
||||
}
|
||||
|
||||
public static CSSMeasureMode fromInt(int value) {
|
||||
switch (value) {
|
||||
case 0: return UNDEFINED;
|
||||
case 1: return EXACTLY;
|
||||
case 2: return AT_MOST;
|
||||
default: throw new IllegalArgumentException("Unkown enum value: " + value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user