net.ontopia.utils
Class CompactIdentityHashSet

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<E>
          extended by net.ontopia.utils.CompactHashSet
              extended by net.ontopia.utils.CompactIdentityHashSet
All Implemented Interfaces:
java.lang.Iterable, java.util.Collection, java.util.Set

public class CompactIdentityHashSet
extends CompactHashSet

INTERNAL: This class is a specialization of the CompactHashSet class, and uses the == operator to compare objects.


Constructor Summary
CompactIdentityHashSet()
           
CompactIdentityHashSet(java.util.Collection coll)
           
CompactIdentityHashSet(int size)
           
 
Method Summary
 boolean add(java.lang.Object o)
          Adds the specified element to this set if it is not already present.
 boolean contains(java.lang.Object o)
          Returns true if this set contains the specified element.
 boolean remove(java.lang.Object o)
          Removes the specified element from the set.
 
Methods inherited from class net.ontopia.utils.CompactHashSet
clear, dump, isEmpty, iterator, size, toArray, toArray
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
addAll, containsAll, retainAll
 

Constructor Detail

CompactIdentityHashSet

public CompactIdentityHashSet()

CompactIdentityHashSet

public CompactIdentityHashSet(int size)

CompactIdentityHashSet

public CompactIdentityHashSet(java.util.Collection coll)
Method Detail

contains

public boolean contains(java.lang.Object o)
Returns true if this set contains the specified element.

Specified by:
contains in interface java.util.Collection
Specified by:
contains in interface java.util.Set
Overrides:
contains in class CompactHashSet
Parameters:
o - element whose presence in this set is to be tested.
Returns:
true if this set contains the specified element.

add

public boolean add(java.lang.Object o)
Adds the specified element to this set if it is not already present.

Specified by:
add in interface java.util.Collection
Specified by:
add in interface java.util.Set
Overrides:
add in class CompactHashSet
Parameters:
o - element to be added to this set.
Returns:
true if the set did not already contain the specified element.

remove

public boolean remove(java.lang.Object o)
Removes the specified element from the set.

Specified by:
remove in interface java.util.Collection
Specified by:
remove in interface java.util.Set
Overrides:
remove in class CompactHashSet


Copyright © 2000-2010 Ontopia.