Skip navigation links

Oracle® OLAP Java API Reference
11g Release 1 (11.1)

B28128-01


oracle.olapi
Class ArraySet

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList
              extended by oracle.olapi.ArraySet

All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess, java.util.Set

public class ArraySet
extends java.util.ArrayList
implements java.util.Set

A resizable-array implementation of the Set interface from the Sun Microsystems collections framework. A set cannot contain duplicate elements.

For the Sun Microsystems util package documentation, see Package java.util. For more general information on the collections framework, see the Sun Microsystems Collections Framework documentation.

See Also:
Serialized Form

Field Summary

 

Fields inherited from class java.util.AbstractList
modCount

 

Constructor Summary
ArraySet()
          Creates an empty set.
ArraySet(java.util.Collection c)
          Creates a set that contains all of the elements of the specified Collection in the order returned by the iterator of the Collection.
ArraySet(int initialCapacity)
          Creates an empty set whose size is the specified initial capacity.

 

Method Summary
 boolean add(java.lang.Object o)
          Adds the specified element to the end of the set if the element is not already present in the set.
 boolean equals(java.lang.Object o)
          Determines if the specified Object contains the same set of elements as this ArraySet.
 int hashCode()
          Returns the hash code value for the ArraySet, which is the sum of all of the hash codes of the elements of the set.

 

Methods inherited from class java.util.ArrayList
add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize

 

Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator, subList

 

Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString

 

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

 

Methods inherited from interface java.util.Set
addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray

 

Methods inherited from interface java.util.List
containsAll, iterator, listIterator, listIterator, removeAll, retainAll, subList

 

Constructor Detail

ArraySet

public ArraySet()
Creates an empty set.

ArraySet

public ArraySet(java.util.Collection c)
Creates a set that contains all of the elements of the specified Collection in the order returned by the iterator of the Collection.
Parameters:
c - The Collection the elements of which you want the ArraySet to have.

ArraySet

public ArraySet(int initialCapacity)
Creates an empty set whose size is the specified initial capacity.
Parameters:
initialCapacity - An integer that specifies an initial size for the ArraySet.

Method Detail

add

public boolean add(java.lang.Object o)
Adds the specified element to the end of the set if the element is not already present in the set.
Specified by:
add in interface java.util.Collection
Specified by:
add in interface java.util.List
Specified by:
add in interface java.util.Set
Overrides:
add in class java.util.ArrayList
Parameters:
o - The element to add to the set.
Returns:
true if this method adds the element to the set and false otherwise.

equals

public boolean equals(java.lang.Object o)
Determines if the specified Object contains the same set of elements as this ArraySet.
Specified by:
equals in interface java.util.Collection
Specified by:
equals in interface java.util.List
Specified by:
equals in interface java.util.Set
Overrides:
equals in class java.util.AbstractList
Parameters:
o - The Object to compare to the ArraySet.
Returns:
true if the elements of the ArraySet are the same as the specified Object and false otherwise.

hashCode

public int hashCode()
Returns the hash code value for the ArraySet, which is the sum of all of the hash codes of the elements of the set. The hash code of a null element is defined as zero.
Specified by:
hashCode in interface java.util.Collection
Specified by:
hashCode in interface java.util.List
Specified by:
hashCode in interface java.util.Set
Overrides:
hashCode in class java.util.AbstractList
Returns:
The hash code value for the ArraySet.

Skip navigation links

Copyright © 2002, 2007, Oracle. All rights reserved.