soot.jimple.toolkits.invoke
Class TypeSet

java.lang.Object
  |
  +--soot.jimple.toolkits.invoke.TypeSet
All Implemented Interfaces:
java.util.Collection, java.util.Set

public class TypeSet
extends java.lang.Object
implements java.util.Set

A bit-vector implementation for flow sets with types as its elements.


Constructor Summary
TypeSet()
          Creates an empty TypeSet.
TypeSet(java.util.Collection c)
          Creates a TypeSet which contains a types specified in the collection c.
 
Method Summary
 boolean add(java.lang.Object o)
          Adds a type to this set.
 boolean addAll(java.util.Collection c)
          Adds all the types in c to this set.
 boolean addAll(TypeSet s)
          Adds all the types in s to this set.
 void clear()
          Removes all types from this set.
 boolean contains(java.lang.Object o)
          Returns true if the type o is in this set, false otherwise.
 boolean containsAll(java.util.Collection c)
          Returns true if all the types in c are in this set, false otherwise.
 boolean equals(java.lang.Object o)
          Tests whether this set is equal to the TypeSet o, in terms of set equality.
 boolean isEmpty()
          Returns true if the set is empty.
 java.util.Iterator iterator()
          Returns an iterator over this set.
 boolean remove(java.lang.Object o)
          Removes the object o from this set.
 boolean removeAll(java.util.Collection c)
          Removes all types in s from this set, if present.
 boolean removeAll(TypeSet s)
          Removes all types in s from this set, if present.
 boolean retainAll(java.util.Collection c)
          Removes all types in this set, except for those specified in s.
 boolean retainAll(TypeSet s)
          Removes all types in this set, except for those specified in s.
 int size()
          Returns the cardinality of this set.
 java.lang.Object[] toArray()
          Returns an object array containing the elements of this set.
 java.lang.Object[] toArray(java.lang.Object[] a)
          Returns an array with the same type as a, containing the elements which are assignment-compatible with the base type of a.
 java.lang.String toString()
          Returns a string representation of this set.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
hashCode
 

Constructor Detail

TypeSet

public TypeSet()
Creates an empty TypeSet.

TypeSet

public TypeSet(java.util.Collection c)
Creates a TypeSet which contains a types specified in the collection c.
Method Detail

add

public boolean add(java.lang.Object o)
Adds a type to this set.
Specified by:
add in interface java.util.Set

addAll

public boolean addAll(java.util.Collection c)
Adds all the types in c to this set.
Specified by:
addAll in interface java.util.Set

addAll

public boolean addAll(TypeSet s)
Adds all the types in s to this set.

removeAll

public boolean removeAll(TypeSet s)
Removes all types in s from this set, if present.

retainAll

public boolean retainAll(TypeSet s)
Removes all types in this set, except for those specified in s.

clear

public void clear()
Removes all types from this set.
Specified by:
clear in interface java.util.Set

contains

public boolean contains(java.lang.Object o)
Returns true if the type o is in this set, false otherwise.
Specified by:
contains in interface java.util.Set

containsAll

public boolean containsAll(java.util.Collection c)
Returns true if all the types in c are in this set, false otherwise.
Specified by:
containsAll in interface java.util.Set

size

public int size()
Returns the cardinality of this set.
Specified by:
size in interface java.util.Set

iterator

public java.util.Iterator iterator()
Returns an iterator over this set.
Specified by:
iterator in interface java.util.Set

toString

public java.lang.String toString()
Returns a string representation of this set.
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Tests whether this set is equal to the TypeSet o, in terms of set equality.
Specified by:
equals in interface java.util.Set
Overrides:
equals in class java.lang.Object

toArray

public java.lang.Object[] toArray()
Returns an object array containing the elements of this set.
Specified by:
toArray in interface java.util.Set

isEmpty

public boolean isEmpty()
Returns true if the set is empty.
Specified by:
isEmpty in interface java.util.Set

remove

public boolean remove(java.lang.Object o)
Removes the object o from this set.
Specified by:
remove in interface java.util.Set

removeAll

public boolean removeAll(java.util.Collection c)
Removes all types in s from this set, if present.
Specified by:
removeAll in interface java.util.Set

retainAll

public boolean retainAll(java.util.Collection c)
Removes all types in this set, except for those specified in s.
Specified by:
retainAll in interface java.util.Set

toArray

public java.lang.Object[] toArray(java.lang.Object[] a)
Returns an array with the same type as a, containing the elements which are assignment-compatible with the base type of a.
Specified by:
toArray in interface java.util.Set