soot.util
Class ArrayNumberer

java.lang.Object
  extended by soot.util.ArrayNumberer
All Implemented Interfaces:
IterableNumberer, Numberer
Direct Known Subclasses:
StringNumberer

public class ArrayNumberer
extends Object
implements IterableNumberer

A class that numbers objects, so they can be placed in bitsets.

Author:
Ondrej Lhotak

Constructor Summary
ArrayNumberer()
           
 
Method Summary
 void add(Object oo)
          Tells the numberer that a new object needs to be assigned a number.
 Object get(long number)
          Should return the object that was assigned the number number.
 long get(Object oo)
          Should return the number that was assigned to object o that was previously passed as an argument to add().
 Iterator iterator()
          Returns an iterator over all objects added to the numberer.
 int size()
          Should return the number of objects that have been assigned numbers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayNumberer

public ArrayNumberer()
Method Detail

add

public void add(Object oo)
Description copied from interface: Numberer
Tells the numberer that a new object needs to be assigned a number.

Specified by:
add in interface Numberer

get

public long get(Object oo)
Description copied from interface: Numberer
Should return the number that was assigned to object o that was previously passed as an argument to add().

Specified by:
get in interface Numberer

get

public Object get(long number)
Description copied from interface: Numberer
Should return the object that was assigned the number number.

Specified by:
get in interface Numberer

size

public int size()
Description copied from interface: Numberer
Should return the number of objects that have been assigned numbers.

Specified by:
size in interface Numberer

iterator

public Iterator iterator()
Description copied from interface: IterableNumberer
Returns an iterator over all objects added to the numberer.

Specified by:
iterator in interface IterableNumberer