wt.epm.util
Class WTCollectionWraper

java.lang.Object
  extended bywt.epm.util.WTCollectionWraper
All Implemented Interfaces:
Collection, Serializable

public class WTCollectionWraper
extends Object
implements Collection, Serializable

See Also:
Serialized Form

Field Summary
private  WTCollection collection
           
private  int iteratorType
           
static int PERSISTABLE_ITERATOR
           
static int QUERYKEY_ITERATOR
           
static int REFERENCE_ITERATOR
           
 
Constructor Summary
WTCollectionWraper(WTCollection collection, int iteratorType)
           
 
Method Summary
 boolean add(Object o)
          Ensures that this collection contains the specified element (optional operation).
 boolean addAll(Collection c)
          Adds all of the elements in the specified collection to this collection (optional operation).
 void clear()
          Removes all of the elements from this collection (optional operation).
 boolean contains(Object o)
          Returns true if this collection contains the specified element.
 boolean containsAll(Collection c)
          Returns true if this collection contains all of the elements in the specified collection.
 boolean equals(Object o)
          Compares the specified object with this collection for equality.
 int hashCode()
          Returns the hash code value for this collection.
 boolean isEmpty()
          Returns true if this collection contains no elements.
 Iterator iterator()
          Returns an iterator over the elements in this collection.
 boolean remove(Object o)
          Removes a single instance of the specified element from this collection, if it is present (optional operation).
 boolean removeAll(Collection c)
          Removes all this collection's elements that are also contained in the specified collection (optional operation).
 boolean retainAll(Collection c)
          Retains only the elements in this collection that are contained in the specified collection (optional operation).
 int size()
          Returns the number of elements in this collection.
 Object[] toArray()
          Returns an array containing all of the elements in this collection.
 Object[] toArray(Object[] a)
          Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REFERENCE_ITERATOR

public static final int REFERENCE_ITERATOR
See Also:
Constant Field Values

PERSISTABLE_ITERATOR

public static final int PERSISTABLE_ITERATOR
See Also:
Constant Field Values

QUERYKEY_ITERATOR

public static final int QUERYKEY_ITERATOR
See Also:
Constant Field Values

collection

private WTCollection collection

iteratorType

private int iteratorType
Constructor Detail

WTCollectionWraper

public WTCollectionWraper(WTCollection collection,
                          int iteratorType)
Method Detail

size

public int size()
Returns the number of elements in this collection.

Specified by:
size in interface Collection
Returns:
the number of elements in this collection

isEmpty

public boolean isEmpty()
Returns true if this collection contains no elements.

Specified by:
isEmpty in interface Collection
Returns:
true if this collection contains no elements

contains

public boolean contains(Object o)
Returns true if this collection contains the specified element.

Specified by:
contains in interface Collection
Parameters:
o - element whose presence in this collection is to be tested.
Returns:
true if this collection contains the specified element

iterator

public Iterator iterator()
Returns an iterator over the elements in this collection.

Specified by:
iterator in interface Collection
Returns:
an Iterator over the elements in this collection

toArray

public Object[] toArray()
Returns an array containing all of the elements in this collection.

Specified by:
toArray in interface Collection
Returns:
an array containing all of the elements in this collection

toArray

public Object[] toArray(Object[] a)
Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array.

Specified by:
toArray in interface Collection
Parameters:
a - the array into which the elements of this collection are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
Returns:
an array containing the elements of this collection

add

public boolean add(Object o)
Ensures that this collection contains the specified element (optional operation).

Specified by:
add in interface Collection
Parameters:
o - element whose presence in this collection is to be ensured.
Returns:
true if this collection changed as a result of the call

remove

public boolean remove(Object o)
Removes a single instance of the specified element from this collection, if it is present (optional operation).

Specified by:
remove in interface Collection
Parameters:
o - element to be removed from this collection, if present.
Returns:
true if this collection changed as a result of the call

containsAll

public boolean containsAll(Collection c)
Returns true if this collection contains all of the elements in the specified collection.

Specified by:
containsAll in interface Collection
Parameters:
c - collection to be checked for containment in this collection.
Returns:
true if this collection contains all of the elements in the specified collection

addAll

public boolean addAll(Collection c)
Adds all of the elements in the specified collection to this collection (optional operation).

Specified by:
addAll in interface Collection
Parameters:
c - elements to be inserted into this collection.
Returns:
true if this collection changed as a result of the call

removeAll

public boolean removeAll(Collection c)
Removes all this collection's elements that are also contained in the specified collection (optional operation).

Specified by:
removeAll in interface Collection
Parameters:
c - elements to be removed from this collection.
Returns:
true if this collection changed as a result of the call

retainAll

public boolean retainAll(Collection c)
Retains only the elements in this collection that are contained in the specified collection (optional operation).

Specified by:
retainAll in interface Collection
Parameters:
c - elements to be retained in this collection.
Returns:
true if this collection changed as a result of the call

clear

public void clear()
Removes all of the elements from this collection (optional operation).

Specified by:
clear in interface Collection

equals

public boolean equals(Object o)
Compares the specified object with this collection for equality.

Specified by:
equals in interface Collection
Parameters:
o - Object to be compared for equality with this collection.
Returns:
true if the specified object is equal to this collection

hashCode

public int hashCode()
Returns the hash code value for this collection.

Specified by:
hashCode in interface Collection
Returns:
the hash code value for this collection