ParamInfoImpl.java
2.21 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xmp.schema.rng.model;
import com.adobe.xmp.schema.rng.model.DatatypeInfo;
import com.adobe.xmp.schema.rng.model.ParamInfo;
import com.adobe.xmp.schema.rng.parser.constants.RNGSymbol;
import java.util.Map;
public class ParamInfoImpl
implements ParamInfo {
private final RNGSymbol mType;
private final Object mValue;
private String mValueType;
private final String mLabel;
public static final ParamInfoImpl PARAM_ALL_TEXT = new ParamInfoImpl("text", null);
public static final ParamInfoImpl PARAM_ALL_INTEGER = new ParamInfoImpl("INTEGER", null);
public static final ParamInfoImpl PARAM_ALL_DOUBLE = new ParamInfoImpl("DOUBLE", null);
public static final ParamInfoImpl PARAM_ALL_BOOLEAN = new ParamInfoImpl("BOOLEAN", null);
public ParamInfoImpl(String type, Object value, String valueType, String label) {
this.mType = RNGSymbol.toSymbol(type);
this.mValue = value;
this.mValueType = valueType;
this.mLabel = label;
}
public ParamInfoImpl(String type, Object value) {
this(type, value, null, "");
}
public RNGSymbol getType() {
return this.mType;
}
public Object getValue() {
return this.mValue;
}
public String getValueType() {
return this.mValueType;
}
public String getXMPValueType() {
return DatatypeInfo.kXMLDatatypes.get(this.mValueType);
}
public String getStringValue() {
return this.mValue instanceof String ? (String)this.mValue : null;
}
public boolean equals(ParamInfo param) {
boolean ret = false;
if (param instanceof ParamInfoImpl) {
ParamInfoImpl info = (ParamInfoImpl)param;
ret = this.mType == info.mType && this.mValue.equals(info.mValue);
}
return ret;
}
public String getLabel() {
return this.mLabel;
}
public String toString() {
StringBuilder str = new StringBuilder();
str.append("\nParamInfo : (" + (Object)((Object)this.mType) + ", ");
str.append(this.mValue + ", ");
str.append(this.mValueType + ", ");
str.append(this.mLabel + " )");
return str.toString();
}
}