Open SiteSearch 4.1.1
Final

ORG.oclc.xml.util
Class Attributes

java.lang.Object
  |
  +--ORG.oclc.xml.util.ReadOnlyAttributes
        |
        +--ORG.oclc.xml.util.Attributes

public class Attributes
extends ReadOnlyAttributes

A class that encapsulates a list of attribute/value pairs.


Constructor Summary
Attributes()
          Construct empty attributes collection.
Attributes(int elems)
          Construct attributes collection with given number of empty slots.
Attributes(ReadOnlyAttributes attrs)
          Construct attributes collection by copying the passed attributes.
Attributes(Vector v)
          Construct attributes collection using the vector of attributes.
 
Method Summary
 Object put(Attribute v)
          Add a new attribute or replace the attribute if it already exists.
 Object put(Name name, Object value)
          Add a new attribute/value pair, or replace the value for attribute if it already exists.
 void remove(Name name)
          Removed the named attribute from the collection.
 void removeAll()
           
 
Methods inherited from class ORG.oclc.xml.util.ReadOnlyAttributes
attributes, get, lookup, size, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Attributes

public Attributes()
Construct empty attributes collection.

Attributes

public Attributes(int elems)
Construct attributes collection with given number of empty slots. The collection will grow automatically if you add more than this number.
Parameters:
elems - the number of attributes to reserve initially.

Attributes

public Attributes(ReadOnlyAttributes attrs)
Construct attributes collection by copying the passed attributes.
Parameters:
attrs - attributes to clone

Attributes

public Attributes(Vector v)
Construct attributes collection using the vector of attributes.
Parameters:
v - Attribute vector
Method Detail

remove

public void remove(Name name)
Removed the named attribute from the collection.

put

public Object put(Name name,
                  Object value)
Add a new attribute/value pair, or replace the value for attribute if it already exists.
Returns:
the previous value for the name attribute or null.

put

public Object put(Attribute v)
Add a new attribute or replace the attribute if it already exists.
Returns:
the previous value for the name attribute or null.

removeAll

public void removeAll()

Open SiteSearch 4.1.1
Final