org.mindswap.xmlparser.utils
Class AttributeList

java.lang.Object
  |
  +--org.mindswap.xmlparser.utils.AttributeList
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class AttributeList
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

See Also:
Serialized Form

Constructor Summary
AttributeList()
           
 
Method Summary
 java.lang.Object clone()
          Clones this attribute list returning a new copy.

 boolean containsKey(java.lang.String key)
          Returns true or false based on whether or not the parameter is an attribute currently in the list.

 java.lang.String get(java.lang.String key)
          Gets the value for an attribute given the attribute name.

 java.lang.String getAttributeByName(java.lang.String name)
          Gets the value for an attribute given the attribute name.

 java.util.Enumeration keys()
          Returns an enumeration of keys in the attribute list.

 void put(java.lang.String key, java.lang.String value)
          Puts an attribute with value into the list.

 int size()
          Returns the number of attributes currently in the list.

 java.lang.String toString()
          Returns a simple text representation of the list.

 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeList

public AttributeList()
Method Detail

size

public int size()
Returns the number of attributes currently in the list.

Returns:
An integer representing the number of attributes currently in the list

containsKey

public boolean containsKey(java.lang.String key)
Returns true or false based on whether or not the parameter is an attribute currently in the list.

Parameters:
key - Attribute to look for
Returns:
true if the key is in the list, false otherwise

keys

public java.util.Enumeration keys()
Returns an enumeration of keys in the attribute list.

Returns:
An instances of the class (RDFClassImpl) described by the parameter

put

public void put(java.lang.String key,
                java.lang.String value)
Puts an attribute with value into the list.

Parameters:
key - Attribute name to store in list
value - Attribute value associated with the key

get

public java.lang.String get(java.lang.String key)
Gets the value for an attribute given the attribute name.

Parameters:
key - Attribute to retrieve from list
Returns:
The value of the specified attribute if found, null otherwise
See Also:
getAttributeByName(java.lang.String)

getAttributeByName

public java.lang.String getAttributeByName(java.lang.String name)
Gets the value for an attribute given the attribute name.

Parameters:
key - Attribute to retrieve from list
Returns:
The value of the specified attribute if found, null otherwise
See Also:
get(java.lang.String)

clone

public java.lang.Object clone()
Clones this attribute list returning a new copy.

Returns:
A copy of the attribute list

toString

public java.lang.String toString()
Returns a simple text representation of the list.

Overrides:
toString in class java.lang.Object
Returns:
A string representing the current key-value pairs in the attribute list