Class COM.odi.util.IndexDescriptorSet
java.lang.Object
|
+----COM.odi.util.IndexDescriptorSet
- public class IndexDescriptorSet
- extends Object
- implements Cloneable, Set, Serializable
IndexDescriptorSet implements a set of IndexDescriptor objects.
There is an additional method, isSupersetOf(), which determines whether
the required indexing capabilities of one IndexDescriptorSet are met
by the indexes present in another IndexDescriptorSet.
This class is included in PSE Pro, but not in PSE.
-
IndexDescriptorSet()
- Create a new, empty IndexDescriptorSet.
-
IndexDescriptorSet(int)
- Create a new, empty IndexdescriptorSet,
and allocate a backing vector of the specified size.
-
add(Object)
- Ensures that this Collection contains the specified element.
-
addAll(Collection)
- Adds all of the elements in the specified Collection to this Collection.
-
clear()
- Removes all of the elements from this Collection.
-
contains(Object)
- Returns true if this Collection contains the specified element.
-
containsAll(Collection)
- Returns true if this Collection contains all of the elements in the
specified Collection.
-
equals(Object)
- Compares the specified Object with this Set for equality.
-
hashCode()
- Returns the hash code value for this Set.
-
isEmpty()
- Returns true if this Collection contains no elements.
-
iterator()
- Returns an Iterator over the elements in this Collection.
-
remove(Object)
- Removes a single instance of the specified element from this Collection,
if it is present.
-
removeAll(Collection)
- Removes from this Collection all of its elements that are contained in
the specified Collection.
-
retainAll(Collection)
- Retains only the elements in this Collection that are contained in the
specified Collection.
-
size()
- Returns the number of elements in this Collection.
-
toArray()
- Returns an array containing all of the elements in this Collection.
IndexDescriptorSet
public IndexDescriptorSet()
- Create a new, empty IndexDescriptorSet.
IndexDescriptorSet
public IndexDescriptorSet(int initSize)
- Create a new, empty IndexdescriptorSet,
and allocate a backing vector of the specified size.
size
public int size()
- Returns the number of elements in this Collection.
isEmpty
public boolean isEmpty()
- Returns true if this Collection contains no elements.
contains
public boolean contains(Object o)
- Returns true if this Collection contains the specified element. More
formally, returns true if and only if this Collection contains at least
one element
e
such that o.equals(e)
.
- Parameters:
- o - element whose presence in this Collection is to be tested.
iterator
public Iterator iterator()
- Returns an Iterator over the elements in this Collection. There are
no guarantees concerning the order in which the elements are returned.
toArray
public Object[] toArray()
- Returns an array containing all of the elements in this Collection.
The returned array will be "safe" in that no references to
it are maintained by the Collection. (In other words, this method must
allocate a new array even if the Collection is backed by an Array).
The caller is thus free to modify the returned array.
This method acts as bridge between array-based and Collection-based
APIs.
add
public boolean add(Object o)
- Ensures that this Collection contains the specified element.
Returns true if the Collection changed as a result of the
call. Returns false if this Collection does not permit duplicates and
already contains the specified element.
- Parameters:
- o - element whose presence in this Collection is to be ensured.
- Returns:
- true if the 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. More formally, removes an
element
e
such that o.equals(e)
, if the
Collection contains one or more such
elements. Returns true if the Collection contained the specified
element (or equivalently, if the Collection changed as a result of the
call).
- Parameters:
- o - element to be removed from this Collection, if present.
- Returns:
- true if the 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.
- See Also:
- contains
addAll
public boolean addAll(Collection c)
- Adds all of the elements in the specified Collection to this Collection.
The behavior of this operation is undefined if
the specified Collection is modified while the operation is in progress.
(This implies that the behavior of this call is undefined if the the
specified Collection is this Collection, and this Collection is
nonempty.)
- Parameters:
- c - elements to be inserted into this Collection.
- Returns:
- true if this Collection changed as a result of the call.
- See Also:
- add
removeAll
public boolean removeAll(Collection c)
- Removes from this Collection all of its elements that are contained in
the specified Collection. After this call returns,
this Collection will contains no elements in common with the specified
Collection.
- Parameters:
- c - elements to be removed from this Collection.
- Returns:
- true if this Collection changed as a result of the call.
- See Also:
- remove, contains
retainAll
public boolean retainAll(Collection coll)
- Retains only the elements in this Collection that are contained in the
specified Collection. In other words, removes from
this Collection all of its elements that are not contained in the
specified Collection.
- Parameters:
- c - elements to be retained in this Collection.
- Returns:
- true if this Collection changed as a result of the call.
- See Also:
- remove, contains
clear
public void clear()
- Removes all of the elements from this Collection.
The Collection will be empty after this call returns.
equals
public boolean equals(Object obj)
- Compares the specified Object with this Set for equality.
Returns true if the given object is also a Set, and the two
Sets have the same size, and every element of the given Set
is also an element of this Set.
Note that this meets the JDK1.2 specification for
Set.equals, but that it means that it is not appropriate to store
an instance of OSHashSet in any hash-based collection, because its
hash code will change if the OSHashSet is modified.
- Parameters:
- o - Object to be compared for equality with this Map.
- Returns:
- true if the specified Object is equal to this Map.
- Overrides:
- equals in class Object
hashCode
public int hashCode()
- Returns the hash code value for this Set. The hash code of a Set
is defined to be the sum of the hashCodes of the elements in the Set.
This ensures that
t1.equals(t2)
implies
that t1.hashCode()==t2.hashCode()
for any two Sets
t1
and t2
, as required by the general
contract of Object.hashCode.
Note that this meets the JDK1.2 specification for
Set.equals, but that it means that it is not appropriate to store
an instance of OSHashSet in any hash-based collection, because its
hash code will change if the OSHashSet is modified.
- Overrides:
- hashCode in class Object
- See Also:
- hashCode, equals, equals
Copyright © 1996, 1997, 1998 Object Design, Inc. All rights reserved.