Bool.java
1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa;
import com.adobe.xfa.EnumAttr;
import com.adobe.xfa.EnumValue;
import com.adobe.xfa.ut.ExFull;
import com.adobe.xfa.ut.MsgFormatPos;
import com.adobe.xfa.ut.ResId;
import com.adobe.xfa.ut.StringUtils;
public final class Bool {
public static EnumAttr falseValue() {
return EnumAttr.getEnum(1074003968);
}
public static EnumAttr getBool(boolean bValue) {
if (bValue) {
return Bool.trueValue();
}
return Bool.falseValue();
}
public static EnumAttr getBool(String sValue) {
if (StringUtils.isEmpty(sValue) || sValue.equals("0")) {
return Bool.falseValue();
}
if (sValue.equals("1")) {
return Bool.trueValue();
}
MsgFormatPos msg = new MsgFormatPos(ResId.InvalidPropertyValueException, sValue);
msg.format("boolean");
throw new ExFull(msg);
}
public static boolean getValue(EnumAttr e) {
return e.getInt() == 1074003969;
}
public static boolean getValue(EnumValue e) {
return e.getInt() == 1074003969;
}
public static String toString(boolean b) {
return b ? "1" : "0";
}
public static EnumAttr trueValue() {
return EnumAttr.getEnum(1074003969);
}
}