Package com.ms.xml.util
 In this topic

*Constructors

*Methods

 

Packages
  PreviousThis PackageNext
Package com.ms.xml.util   Previous This
Package
Next

 


Class ReadOnlyAttributes

public class ReadOnlyAttributes
{
  // Constructors
  public ReadOnlyAttributes();
  public ReadOnlyAttributes(Vector v);
  public ReadOnlyAttributes(int elems);

  // Methods
  public Enumeration attributes();
  public Object get(Name name);
  public Attribute lookup(Name name);
  public int size();
  public String toString();
}

This class encapsulates a read-only list of Attribute objects.

Constructors

ReadOnlyAttributes

public ReadOnlyAttributes();

Constructs an empty read-only Attribute collection.

ReadOnlyAttributes

public ReadOnlyAttributes(Vector v);

Constructs a read-only collection of Attribute objects using the given Vector of Attributes.

ParameterDescription
v The Vector that contains the Attribute objects.

ReadOnlyAttributes

public ReadOnlyAttributes(int elems);

Constructs an empty Attribute collection of the specified size. If you add more Attribute objects to the collection than the initially specified size, it grows automatically.

ParameterDescription
elems The number of Attribute objects to initially reserve space for in the collection.

Methods

attributes

public Enumeration attributes();

Retrieves an Enumeration of the Attribute objects in the collection.

Return Value:

Returns an Enumeration of the Attribute objects in the collection.

get

public Object get(Name name);

Retrieves the named Attribute object and returns its associated value.

Return Value:

Returns an object that is the associated value for the named Attribute.

ParameterDescription
name A Name object that identifies the Attribute to retrieve.

lookup

public Attribute lookup(Name name);

Cycles through the collection of Attribute objects and retrieves the named Attribute, if it is present.

Return Value:

Returns the named Attribute; returns null if the Attribute is not currently included in the collection.

ParameterDescription
name The Name of the Attribute to retrieve.

size

public int size();

Retrieves the number of Attribute Name and value pairs currently in the collection.

Return Value:

Returns the number of pairs in the collection.

toString

public String toString();

Retrieves a String representation of the class name of the ReadOnlyAttributes object.

Return Value:

Returns the class name for the ReadOnlyAttributes object.

upnrm.gif