Public Member Functions

org.exolab.castor.xml.util.XMLFieldDescriptors Class Reference

List of all members.

Public Member Functions

 XMLFieldDescriptors ()
 XMLFieldDescriptors (int size)
boolean add (XMLFieldDescriptor descriptor)
void clear ()
Object clone ()
boolean contains (XMLFieldDescriptor descriptor)
boolean equals (Object obj)
XMLFieldDescriptor get (int index) throws IndexOutOfBoundsException
int hashCode ()
int indexOf (XMLFieldDescriptor descriptor)
boolean isEmpty ()
XMLFieldDescriptor remove (int index)
boolean remove (XMLFieldDescriptor descriptor)
void trimToSize ()
int size ()
XMLFieldDescriptor[] toArray ()
XMLFieldDescriptor[] toArray (XMLFieldDescriptor[] dst)
XMLFieldDescriptor[] toArray (XMLFieldDescriptor[] dst, int offset)

Detailed Description

A class which represents a collection of XMLFieldDescriptor instances.

Author:
Keith Visco
Version:
Revision:
1.1.1.1
Date:
2003/03/03 07:09:50
See also:
java.util.List
java.util.Collection

Constructor & Destructor Documentation

org.exolab.castor.xml.util.XMLFieldDescriptors.XMLFieldDescriptors (  ) 

Creates a new XMLFieldDescriptors with the default Size

org.exolab.castor.xml.util.XMLFieldDescriptors.XMLFieldDescriptors ( int  size  ) 

Creates a new XMLFieldDescriptors with the given size.

Parameters:
size the initial size of the internal collection.

Member Function Documentation

boolean org.exolab.castor.xml.util.XMLFieldDescriptors.add ( XMLFieldDescriptor  descriptor  ) 

Adds the specified XMLFieldDescriptor to the collection. If the specified XMLFieldDescriptor is already contained in the collection, it will not be re-added, false will be returned.

Parameters:
descriptor the XMLFieldDescriptor to add
Returns:
true if the descriptor is added, false otherwise.

Referenced by org.exolab.castor.xml.util.XMLClassDescriptorImpl.sortDescriptors().

void org.exolab.castor.xml.util.XMLFieldDescriptors.clear (  ) 

Removes all descriptors from this collection.

Object org.exolab.castor.xml.util.XMLFieldDescriptors.clone (  ) 
boolean org.exolab.castor.xml.util.XMLFieldDescriptors.contains ( XMLFieldDescriptor  descriptor  ) 

Returns true if the specified descriptor is contained in this collection. If the descriptor is null, then if this collection contains a null value, true will be returned.

Parameters:
descriptor the XMLFieldDescriptor to search the list for
Returns:
true if specified descriptor is contained in the list

References org.exolab.castor.xml.util.XMLFieldDescriptors.indexOf().

Referenced by org.exolab.castor.xml.util.XMLClassDescriptorImpl.contains(), and org.exolab.castor.xml.util.XMLClassDescriptorImpl.setIdentity().

boolean org.exolab.castor.xml.util.XMLFieldDescriptors.equals ( Object  obj  ) 

Compares the specified object with this list for equality. Returns true if and only if the specified Object is a list and all of its associated elements are equal to the elements of this list

Returns:
true if the given object is considered equal to this list.
XMLFieldDescriptor org.exolab.castor.xml.util.XMLFieldDescriptors.get ( int  index  )  throws IndexOutOfBoundsException

Returns the XMLFieldDescriptor at the specified position in this list.

Parameters:
index the position of the descriptor to return
Exceptions:
IndexOutOfBoundsException 

Referenced by org.exolab.castor.xml.util.XMLClassDescriptorImpl.validate().

int org.exolab.castor.xml.util.XMLFieldDescriptors.hashCode (  ) 

As defined by the JDK 1.2 API spec:
Returns the hash code value for this list. The hash code of a list is defined to be the result of the following calculation:
hashCode = 1; Iterator i = list.iterator(); while (i.hasNext()) { Object obj = i.next(); hashCode = 31*hashCode + (obj==null ? 0 : obj.hashCode()); }

Returns:
the hash code value for this list
int org.exolab.castor.xml.util.XMLFieldDescriptors.indexOf ( XMLFieldDescriptor  descriptor  ) 

Returns the index of the first occurrence of the specified XMLFieldDescriptor, or -1 if the descriptor is not contained in the collection.

Parameters:
descriptor the XMLFieldDescriptor to get the index of

Referenced by org.exolab.castor.xml.util.XMLFieldDescriptors.contains(), and org.exolab.castor.xml.util.XMLFieldDescriptors.remove().

boolean org.exolab.castor.xml.util.XMLFieldDescriptors.isEmpty (  ) 

Returns true if there are no descriptors in the collection.

Returns:
true if the collection is empty.
XMLFieldDescriptor org.exolab.castor.xml.util.XMLFieldDescriptors.remove ( int  index  ) 

Removes the descriptor at the specified index from the list.

Parameters:
index the position in the list to remove the descriptor from.
Returns:
the descriptor that was removed from the list.

Referenced by org.exolab.castor.xml.util.XMLClassDescriptorImpl.removeFieldDescriptor(), and org.exolab.castor.xml.util.XMLClassDescriptorImpl.sortDescriptors().

boolean org.exolab.castor.xml.util.XMLFieldDescriptors.remove ( XMLFieldDescriptor  descriptor  ) 

Removes the given XMLFieldDescriptor from the list.

Parameters:
descriptor the XMLFieldDescriptor to remove from the list.
Returns:
true if the descriptor was removed from the list.

References org.exolab.castor.xml.util.XMLFieldDescriptors.indexOf().

int org.exolab.castor.xml.util.XMLFieldDescriptors.size (  ) 

Returns the number of descriptors in the list.

Returns:
the number of descriptors in the list.

Referenced by org.exolab.castor.xml.util.XMLClassDescriptorImpl.getFields(), and org.exolab.castor.xml.util.XMLClassDescriptorImpl.validate().

XMLFieldDescriptor [] org.exolab.castor.xml.util.XMLFieldDescriptors.toArray ( XMLFieldDescriptor[]  dst  ) 

Returns an array containing all of the descriptors in this list in proper sequence.

Returns:
the array of descriptors of this list.

References org.exolab.castor.xml.util.XMLFieldDescriptors.toArray().

XMLFieldDescriptor [] org.exolab.castor.xml.util.XMLFieldDescriptors.toArray (  ) 

Returns an array containing all of the descriptors in this list in proper sequence.

Returns:
the array of descriptors of this List

Referenced by org.exolab.castor.xml.util.XMLClassDescriptorImpl.getFields(), and org.exolab.castor.xml.util.XMLFieldDescriptors.toArray().

XMLFieldDescriptor [] org.exolab.castor.xml.util.XMLFieldDescriptors.toArray ( XMLFieldDescriptor[]  dst,
int  offset 
)

Returns an array containing all of the elements in this list in proper sequence.

Returns:
the array of descriptors of this list.
void org.exolab.castor.xml.util.XMLFieldDescriptors.trimToSize (  ) 

Reduces the capacity of the internal buffer to the current size freeing up unused memory.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties