|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.itim.common.ValueObject | +--com.ibm.itim.common.AttributeValue
This class holds a single or multi-valued attribute. An attribute consists of a name and one or more values.
Constructor Summary | |
---|---|
AttributeValue()
Default constructor. |
|
AttributeValue(java.lang.String name,
boolean value)
Constructs with a name and a single boolean value. |
|
AttributeValue(java.lang.String name,
byte[] value)
Constructs with a name and a single byte array value. |
|
AttributeValue(java.lang.String name,
java.util.Collection values)
Constructs with a name and a collection of Objects for values. |
|
AttributeValue(java.lang.String name,
java.util.Date value)
Constructs with a name and a single date value. |
|
AttributeValue(java.lang.String name,
int value)
Constructs with a name and a single integer value. |
|
AttributeValue(java.lang.String name,
long value)
Constructs with a name and a single long value. |
|
AttributeValue(java.lang.String name,
java.util.Map mapValue)
Deprecated. This will no longer be supported. Clients with this need must perform this parsing first and use the collection-based contstructor. |
|
AttributeValue(java.lang.String name,
java.lang.Object value)
Constructs with a name and a single Object as a value. |
Method Summary | |
---|---|
void |
addValue(java.lang.Object value)
Adds the provided Object to the values of the attribute. |
void |
addValues(java.util.Collection morevalues)
Adds the given values to the attribute. |
java.lang.Object |
clone()
This method returns a deep copy of the underlying map of AttributeValue objects |
boolean |
equals(java.lang.Object obj)
Compare this object against specified object for equality, using simple String equality. |
java.lang.String |
getBinaryString()
Retrieves the single binary string value of the attribute as a String. |
boolean |
getBoolean()
Retrieves the single value of the attribute as a boolean. |
byte[] |
getBytes()
Retrieves the single value of the attribute as a byte array. |
java.util.Date |
getDate()
Retrieves the single value of the attribute as a Date. |
int |
getInt()
Retrieves the single value of the attribute as an integer. |
long |
getLong()
Retrieves the single value of the attribute as an long. |
java.util.Map |
getMapValue()
Deprecated. This will no longer be supported. Clients with this need must retrieve the Objects and parse them themselves. |
java.lang.String |
getName()
Returns the name of the attribute. |
java.lang.Object |
getSingleValue()
Returns the single value of an attribute as an Object. |
java.lang.String |
getString()
Retrieves the single value of the attribute as a String. |
java.util.Collection |
getValues()
Returns the values of the attribute in a collection. |
java.lang.String |
getValueString()
Returns the values of the attribute as a comma separated string. |
int |
hashCode()
Overwrite the hashCode() method of Object |
boolean |
isValueEmpty()
Returns whether the attribute has no value or the empty string as a value. |
boolean |
isValueExist(java.lang.Object value)
Returns whether the given value is present in this attribute. |
void |
removeValue(java.lang.Object value)
Removes the given value from the attribute. |
void |
removeValues(java.util.Collection morevalues)
Removes the given values from the attribute. |
void |
replaceSingleValue(java.lang.Object value)
Will replace the current single value with the given Object or initialize the value with the Object if no previous value is present. |
void |
setBoolean(boolean boolValue)
Sets the single value of the attribute as a boolean. |
void |
setBytes(byte[] byteValue)
Sets the single value of the attribute as a byte array. |
void |
setInt(int intValue)
Sets the single value of the attribute as an integer. |
void |
setLong(long longValue)
Sets the single value of the attribute as an long. |
void |
setMapValue(java.util.Map map)
Deprecated. This will no longer be supported. Clients with this need must perform this parsing first and use the setValues method that uses a Collection. |
void |
setName(java.lang.String name)
Changes the name of the attribute. |
void |
setSingleValue(java.lang.Object value)
Will replace the current single value with the given Object or initialize the value with the Object if no previous value is present. |
void |
setValue(java.util.Collection values)
Replaces the current values with a new collection of Objects. |
void |
setValues(java.util.Collection newValues)
Sets the values of the attribute. |
java.lang.String |
toString()
Returns a string representation of the attribute. |
java.lang.String |
toXML()
Returns an XML String representation of the attribute. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AttributeValue()
public AttributeValue(java.lang.String name, java.util.Collection values)
name
- Name of the attribute.values
- Collection of Objects to be used as values.public AttributeValue(java.lang.String name, java.lang.Object value)
name
- Name of the attribute.value
- Object to be used as single value.public AttributeValue(java.lang.String name, int value)
name
- Name of the attribute.value
- int to be used as single value.public AttributeValue(java.lang.String name, long value)
name
- Name of the attribute.value
- long to be used as single value.public AttributeValue(java.lang.String name, boolean value)
name
- Name of the attribute.value
- boolean to be used as single value.public AttributeValue(java.lang.String name, byte[] value)
name
- Name of the attribute.value
- byte[] to be used as single value.public AttributeValue(java.lang.String name, java.util.Date value)
name
- Name of the attribute.value
- Date to be used as single value.public AttributeValue(java.lang.String name, java.util.Map mapValue)
name
- Name of the attribute.mapValue
- Map holding name-value pairs. These pairs will be
stored as Method Detail |
public java.lang.String getName()
public void setName(java.lang.String name)
name
- New name of the attribute.public void setValue(java.util.Collection values)
values
- Collection of Objects to be the new values.public java.lang.Object getSingleValue()
java.lang.ArrayIndexOutOfBoundsException
- Thrown if no values are
present.public void setSingleValue(java.lang.Object value)
value
- Object to set as single value.public void replaceSingleValue(java.lang.Object value)
value
- Object to set as single value.public int getInt()
public void setInt(int intValue)
intValue
- int representing the new value.public long getLong()
public void setLong(long longValue)
longValue
- long representing the new value.public boolean getBoolean()
public void setBoolean(boolean boolValue)
boolValue
- boolean representing the new value.public byte[] getBytes()
public void setBytes(byte[] byteValue)
byteValue
- byte[] representing the new value.public java.lang.String getString()
public java.util.Date getDate()
public java.lang.String getBinaryString()
public boolean isValueExist(java.lang.Object value)
value
- Object representing the value to search for.
public boolean isValueEmpty()
public void addValue(java.lang.Object value)
value
- Object to add.public void addValues(java.util.Collection morevalues)
morevalues
- Collection of values to add.public void removeValue(java.lang.Object value)
value
- to remove.public void removeValues(java.util.Collection morevalues)
morevalues
- Collection of values to remove.public java.util.Collection getValues()
public void setValues(java.util.Collection newValues)
newValues
- Collection of values of the attribute.public java.util.Map getMapValue()
public void setMapValue(java.util.Map map)
map
- Map holding name-value pairs. These pairs will be
stored as public java.lang.String getValueString()
public java.lang.String toString()
toString
in class ValueObject
public java.lang.String toXML()
public java.lang.Object clone()
clone
in class ValueObject
public int hashCode()
ValueObject
hashCode
in class ValueObject
public boolean equals(java.lang.Object obj)
equals
in class ValueObject
obj
- object to compare against
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |