com.ibm.itim.common
Class AttributeValues

java.lang.Object
  extended by com.ibm.itim.common.AttributeValues
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable<AttributeValue>

public class AttributeValues
extends java.lang.Object
implements java.io.Serializable, java.lang.Iterable<AttributeValue>

Contains a map of AttributeValue objects. The keys are the names of the AttribtueValue objects converted to lower case. Case is ignored in storing and looking up objects in the map.

See Also:
Serialized Form

Constructor Summary
AttributeValues()
          Creates new AttributeValues with no entries
AttributeValues(AttributeValues attributeValues)
          Creates new AttributeValues with the given AttributeValues object.
AttributeValues(java.util.Collection<AttributeValue> attributeValueCollection)
          Creates new AttributeValues with the entries in the collection
AttributeValues(java.util.Map<java.lang.String,AttributeValue> attributeValues)
          Creates new AttributeValues with the given map.
 
Method Summary
 void clear()
          This method clears the underlying hashmap structure without setting it to null;
 java.lang.Object clone()
          This method returns a deep copy of the underlying map of AttributeValue objects
 void combine(AttributeValues attributeValues)
          Combines the values in this AttributeValues object with the given AttributeValues object
 boolean containsKey(java.lang.String name)
          Determine whether an AttributeValue object exists in the map
 boolean equals(java.lang.Object attributeValues)
          Determines if this object is equivalent to the given set of AttributeValue objects.
 AttributeValue get(java.lang.String name)
          Get an AttributeValue from the map with the given name.
 java.lang.StringBuffer getDifferences(java.lang.Object attributeValues)
          Return a StringBuffer describing the differences between this & specified AttributeValues object, for log messages.
 java.util.Map<java.lang.String,AttributeValue> getMap()
          Returns the Map of AttributeValue objects.
 int hashCode()
          Override the method from java.lang.Object.
 boolean isEmpty()
          Determines whether the collection of AttributeValues is empty
 AttributeValueIterator iterator()
          Get an iterator to iterate over AttributeValue's in the map
 void put(AttributeValue attributeValue)
          Adds an AttributeValue object to the Map
 void remove(java.lang.String name)
          Remove an AttributeValue object from the map
 int size()
          Returns the number of AttributeValue objects in the AttributeValues.
 java.lang.String toString()
          Overrides Object.toString()
 java.util.Collection<AttributeValue> values()
          Gets a collection of all the values in the map
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeValues

public AttributeValues()
Creates new AttributeValues with no entries


AttributeValues

public AttributeValues(AttributeValues attributeValues)
Creates new AttributeValues with the given AttributeValues object. Makes a copy of that object's map.

Parameters:
attributeValues - a map of AttributeValue objects

AttributeValues

public AttributeValues(java.util.Map<java.lang.String,AttributeValue> attributeValues)
Creates new AttributeValues with the given map. Makes a copy of the given map.

Parameters:
attributeValues - a map of AttributeValue objects

AttributeValues

public AttributeValues(java.util.Collection<AttributeValue> attributeValueCollection)
Creates new AttributeValues with the entries in the collection

Parameters:
attributeValueCollection - A collection of AttributeValue objects
Method Detail

combine

public void combine(AttributeValues attributeValues)
Combines the values in this AttributeValues object with the given AttributeValues object

Parameters:
attributeValues - Add AttributeValue object from this parameter to this object

put

public void put(AttributeValue attributeValue)
Adds an AttributeValue object to the Map

Parameters:
attributeValue - The object to add to the map

get

public AttributeValue get(java.lang.String name)
Get an AttributeValue from the map with the given name. The name is case insensitive.

Parameters:
name - The name of the attribute to retrieve from the map
Returns:
The AttributeValue in the map or null if the name was null

iterator

public AttributeValueIterator iterator()
Get an iterator to iterate over AttributeValue's in the map

Specified by:
iterator in interface java.lang.Iterable<AttributeValue>
Returns:
an iterator

containsKey

public boolean containsKey(java.lang.String name)
Determine whether an AttributeValue object exists in the map

Parameters:
name - The name of the attribute to retrieve from the map
Returns:
True if the AttributeValue object is present

remove

public void remove(java.lang.String name)
Remove an AttributeValue object from the map

Parameters:
name - The name of the attribute to retrieve from the map

values

public java.util.Collection<AttributeValue> values()
Gets a collection of all the values in the map

Returns:
Collection of AttributeValue objects

getMap

public java.util.Map<java.lang.String,AttributeValue> getMap()
Returns the Map of AttributeValue objects.

Returns:
Map of AttributeValue objects

equals

public boolean equals(java.lang.Object attributeValues)
Determines if this object is equivalent to the given set of AttributeValue objects. Empty attribute values are treated as equivalent to attributes that are not present.

Overrides:
equals in class java.lang.Object
Parameters:
attributeValues - The set of AttributeValues to compare to
Returns:
true if the two sets are equal (comparing based on attribute type, using the SyntaxId and the DirectoryAttributeEqualityComparator class)

getDifferences

public java.lang.StringBuffer getDifferences(java.lang.Object attributeValues)
Return a StringBuffer describing the differences between this & specified AttributeValues object, for log messages.

Parameters:
attributeValues - object to compare against
Returns:
StringBuffer describing changes / empty if same

hashCode

public int hashCode()
Override the method from java.lang.Object.

Overrides:
hashCode in class java.lang.Object
Returns:
the sum of the hashCodes of the elements

isEmpty

public boolean isEmpty()
Determines whether the collection of AttributeValues is empty

Returns:
True if there are no elements in the collection

toString

public java.lang.String toString()
Overrides Object.toString()

Overrides:
toString in class java.lang.Object
Returns:
A string listing all the AttributeValues in the collection

size

public int size()
Returns the number of AttributeValue objects in the AttributeValues.

Returns:
the number of AttributeValue objects in the AttributeValues.

clone

public java.lang.Object clone()
This method returns a deep copy of the underlying map of AttributeValue objects

Overrides:
clone in class java.lang.Object
Returns:
exact copy of this object

clear

public void clear()
This method clears the underlying hashmap structure without setting it to null;



IBM Security Identity Manager 6.0.0
© Copyright International Business Machines Corporation 2007, 2012. All rights reserved. US Government Users Restricited Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.