public static final class ProfileDataCollection.AttributeValue extends Object implements Serializable
Class representing an exported profile attribute value. Objects of this class encapsulate either a java.lang.String object representing an exported value, or an array of AttributeValue objects representing the exported elements of an array-type attribute. Null attribute values and null array elements are exported as null values, rather than as an AttributeValue instance encapsulating a null value.
| Constructor and Description |
|---|
AttributeValue(ProfileDataCollection.AttributeValue[] values)
Create a new attribute value encapsulating an array of attribute value elements.
|
AttributeValue(String value)
Create a new attribute value encapsulating an exported value.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getValue()
Get the simple string value encapsulated by this object.
|
ProfileDataCollection.AttributeValue[] |
getValues()
Get the array encapsulated by this object.
|
boolean |
isArray()
Determine if this object encapsulates an array of elements.
|
String |
toString()
Convert the attribute value (and any nested array values) into a human-readable form.
|
public AttributeValue(String value)
Create a new attribute value encapsulating an exported value.
value - the exported value.NullPointerException - if value is null.public AttributeValue(ProfileDataCollection.AttributeValue[] values)
Create a new attribute value encapsulating an array of attribute value elements.
values - the exported array elements.NullPointerException - if values is null.public boolean isArray()
Determine if this object encapsulates an array of elements.
true if this object encapulates an array of elements,
false if a simple string value is encapsulated.public String getValue()
Get the simple string value encapsulated by this object. isArray()
must return false in order to be able to use this method.
IllegalArgumentException - if a string value is not encapsulated by
this object.public ProfileDataCollection.AttributeValue[] getValues()
Get the array encapsulated by this object. isArray() must return
true in order to be able to use this method.
IllegalArgumentException - if an attribute value array is not encapsulated
by this object.