soot.util
Interface Numberer<E>

All Known Subinterfaces:
IterableNumberer<E>
All Known Implementing Classes:
ArrayNumberer, IntegerNumberer, MapNumberer, StringNumberer, ZArrayNumberer

public interface Numberer<E>

A numberer converts objects to unique non-negative integers, and vice-versa.

Author:
xiao, generalize the interface

Method Summary
 void add(E o)
          Tells the numberer that a new object needs to be assigned a number.
 long get(E o)
          Should return the number that was assigned to object o that was previously passed as an argument to add().
 E get(long number)
          Should return the object that was assigned the number number.
 int size()
          Should return the number of objects that have been assigned numbers.
 

Method Detail

add

void add(E o)
Tells the numberer that a new object needs to be assigned a number.


get

long get(E o)
Should return the number that was assigned to object o that was previously passed as an argument to add().


get

E get(long number)
Should return the object that was assigned the number number.


size

int size()
Should return the number of objects that have been assigned numbers.