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 boolean
equals(Object o)
ProfileDataCollection.MappedAttributeValue
getMappings()
Get the mappings encapsulated by this object.String
getValue()
Get the simple string value encapsulated by this object.ProfileDataCollection.AttributeValue[]
getValues()
Get the array encapsulated by this object.int
hashCode()
boolean
isArray()
Determine if this object encapsulates an array of elements.boolean
isMapping()
Determine if this object encapsulates a map of entries.String
toString()
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
- ifvalue
is 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
- ifvalues
is 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
- ifmappings
is null.
-
-
Method Detail
-
isArray
public boolean isArray()
Determine if this object encapsulates an array of elements.
- Returns:
true
if this object encapulates an array of elements,false
if a simple string value is encapsulated.
-
isMapping
public boolean isMapping()
Determine if this object encapsulates a map of entries.
- Returns:
true
if this object encapsulates a map of entries,false
if a simple string value is encapsulated.
-
getValue
public String getValue()
Get the simple string value encapsulated by this object.
isArray()
must returnfalse
in 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 returntrue
in 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 returntrue
in 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.
-
-