Attribute.java
1.44 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
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.granite.auth.saml.model;
import java.util.ArrayList;
import java.util.List;
public class Attribute {
private String name;
private String nameFormat;
private Object attributeValue;
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getNameFormat() {
return this.nameFormat;
}
public void setNameFormat(String nameFormat) {
this.nameFormat = nameFormat;
}
public void addAttributeValue(Object value) {
if (null == this.attributeValue) {
this.attributeValue = value;
} else if (this.attributeValue instanceof List) {
((List)this.attributeValue).add(value);
} else {
Object oldValue = this.attributeValue;
ArrayList<Object> newValue = new ArrayList<Object>();
newValue.add(oldValue);
newValue.add(value);
this.attributeValue = newValue;
}
}
public Object getValue() {
return this.attributeValue;
}
public List<Object> getListValue() {
ArrayList<Object> result;
if (this.attributeValue instanceof List) {
result = (ArrayList<Object>)this.attributeValue;
} else {
result = new ArrayList<Object>();
result.add(this.attributeValue);
}
return result;
}
}