jedd
Interface Numberer


public interface Numberer

A numberer converts objects to unique non-negative integers, and vice-versa. The Jedd programmer must implement numberers for domains used in the program.


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

Method Detail

add

public void add(java.lang.Object o)
Tells the numberer that a new object needs to be assigned a number.


get

public int get(java.lang.Object o)
Should return the number that was assigned to object o that was previously passed as an argument to add().


get

public java.lang.Object get(int number)
Should return the object that was assigned the number number.


size

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