Class ProfileDataCollection.AttributeValue
- java.lang.Object
-
- com.opencloud.slee.profile.ProfileDataCollection.AttributeValue
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- ProfileDataCollection
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.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AttributeValue(ProfileDataCollection.AttributeValue[] values)Create a new attribute value encapsulating an array of attribute value elements.AttributeValue(ProfileDataCollection.MappedAttributeValue mappings)Create a new attribute value encapsulating a map of entries.AttributeValue(String value)Create a new attribute value encapsulating an exported value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)ProfileDataCollection.MappedAttributeValuegetMappings()Get the mappings encapsulated by this object.StringgetValue()Get the simple string value encapsulated by this object.ProfileDataCollection.AttributeValue[]getValues()Get the array encapsulated by this object.inthashCode()booleanisArray()Determine if this object encapsulates an array of elements.booleanisMapping()Determine if this object encapsulates a map of entries.StringtoString()Convert the attribute value (and any nested array values) into a human-readable form.
-
-
-
Constructor Detail
-
AttributeValue
public AttributeValue(String value)
Create a new attribute value encapsulating an exported value.
- Parameters:
value- the exported value.- Throws:
NullPointerException- ifvalueis null.
-
AttributeValue
public AttributeValue(ProfileDataCollection.AttributeValue[] values)
Create a new attribute value encapsulating an array of attribute value elements.
- Parameters:
values- the exported array elements.- Throws:
NullPointerException- ifvaluesis null.
-
AttributeValue
public AttributeValue(ProfileDataCollection.MappedAttributeValue mappings)
Create a new attribute value encapsulating a map of entries.
- Parameters:
mappings- the exported map entries.- Throws:
NullPointerException- ifmappingsis null.
-
-
Method Detail
-
isArray
public boolean isArray()
Determine if this object encapsulates an array of elements.
- Returns:
trueif this object encapulates an array of elements,falseif a simple string value is encapsulated.
-
isMapping
public boolean isMapping()
Determine if this object encapsulates a map of entries.
- Returns:
trueif this object encapsulates a map of entries,falseif a simple string value is encapsulated.
-
getValue
public String getValue()
Get the simple string value encapsulated by this object.
isArray()must returnfalsein order to be able to use this method.- Returns:
- the exported string value encapsulated by this object.
- Throws:
IllegalArgumentException- if a string value is not encapsulated by this object.
-
getValues
public ProfileDataCollection.AttributeValue[] getValues()
Get the array encapsulated by this object.
isArray()must returntruein order to be able to use this method.- Returns:
- the exported array of attribute values encapsulated by this object.
- Throws:
IllegalArgumentException- if an attribute value array is not encapsulated by this object.
-
getMappings
public ProfileDataCollection.MappedAttributeValue getMappings()
Get the mappings encapsulated by this object.
isMapping()must returntruein order to be able to use this method.- Returns:
- the exported attribute value mappings encapsulated by this object.
- Throws:
IllegalArgumentException- if attribute value mappings are not encapsulated by this object.
-
-