soot.util
Class IdentityHashSet

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractSet
          extended bysoot.util.IdentityHashSet
All Implemented Interfaces:
Collection, Set

public class IdentityHashSet
extends AbstractSet
implements Set

Implements a hashset with comparison over identity.

Author:
Eric Bodden

Field Summary
protected  IdentityHashMap delegate
           
 
Constructor Summary
IdentityHashSet()
          Creates a new, empty IdentityHashSet.
 
Method Summary
 boolean add(Object o)
          
 void clear()
          
 boolean contains(Object o)
          
 boolean equals(Object obj)
           
 int hashCode()
           
 Iterator iterator()
          
 boolean remove(Object o)
          
 int size()
          
 String toString()
          
 
Methods inherited from class java.util.AbstractSet
removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, retainAll, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
addAll, containsAll, isEmpty, removeAll, retainAll, toArray, toArray
 

Field Detail

delegate

protected IdentityHashMap delegate
Constructor Detail

IdentityHashSet

public IdentityHashSet()
Creates a new, empty IdentityHashSet.

Method Detail

size

public int size()

Specified by:
size in interface Set

contains

public boolean contains(Object o)

Specified by:
contains in interface Set

iterator

public Iterator iterator()

Specified by:
iterator in interface Set

add

public boolean add(Object o)

Specified by:
add in interface Set

remove

public boolean remove(Object o)

Specified by:
remove in interface Set

clear

public void clear()

Specified by:
clear in interface Set

hashCode

public int hashCode()
Specified by:
hashCode in interface Set

equals

public boolean equals(Object obj)
Specified by:
equals in interface Set

toString

public String toString()