TPTP 4.2.0 Platform Project
Internal API Specification

org.eclipse.hyades.models.hierarchy.util.internal
Class IdentityHashSet

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractSet
          extended byorg.eclipse.hyades.models.hierarchy.util.internal.IdentityHashSet
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.Set

public class IdentityHashSet
extends java.util.AbstractSet
implements java.util.Set, java.lang.Cloneable

Since:
4.2

Field Summary
protected  java.util.IdentityHashMap map
           
 
Constructor Summary
IdentityHashSet()
           
 
Method Summary
 boolean add(java.lang.Object o)
          Adds the specified element to this set if it is not already present.
 void clear()
          Removes all of the elements from this set.
 java.lang.Object clone()
          Returns a shallow copy of this HashSet instance: the elements themselves are not cloned.
 boolean contains(java.lang.Object o)
          Returns true if this set contains the specified element.
 boolean isEmpty()
          Returns true if this set contains no elements.
 java.util.Iterator iterator()
          Returns an iterator over the elements in this set.
 boolean remove(java.lang.Object o)
          Removes the specified element from this set if it is present.
 int size()
          Returns the number of elements in this set (its cardinality).
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
 

Field Detail

map

protected transient java.util.IdentityHashMap map
Constructor Detail

IdentityHashSet

public IdentityHashSet()
Method Detail

iterator

public java.util.Iterator iterator()
Returns an iterator over the elements in this set. The elements are returned in no particular order.

Specified by:
iterator in interface java.util.Set
Returns:
an Iterator over the elements in this set.
See Also:
ConcurrentModificationException

size

public int size()
Returns the number of elements in this set (its cardinality).

Specified by:
size in interface java.util.Set
Returns:
the number of elements in this set (its cardinality).

isEmpty

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

Specified by:
isEmpty in interface java.util.Set
Returns:
true if this set contains no elements.

contains

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

Specified by:
contains in interface java.util.Set
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.Set
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 this set if it is present.

Specified by:
remove in interface java.util.Set
Parameters:
o - object to be removed from this set, if present.
Returns:
true if the set contained the specified element.

clear

public void clear()
Removes all of the elements from this set.

Specified by:
clear in interface java.util.Set

clone

public java.lang.Object clone()
Returns a shallow copy of this HashSet instance: the elements themselves are not cloned.

Returns:
a shallow copy of this set.

TPTP 4.2.0 Platform Project
Internal API Specification