com.inxar.syntacs.util
Class TreeListIntRelation

java.lang.Object
  |
  +--com.inxar.syntacs.util.TreeListIntRelation
All Implemented Interfaces:
IntRelation

public class TreeListIntRelation
extends Object
implements IntRelation

Concrete implementation of IntRelation which uses as a binary tree such that ListIntSet instances are implicitly created at each tree node.


Constructor Summary
TreeListIntRelation()
          Constructs the TreeListIntRelation.
 
Method Summary
 IntSet get(int key)
          Returns the set under the given key.
 boolean isEmpty()
          Returns true if the set of keys is the empty set.
 IntSet keys()
          Returns the set of keys.
 void put(int key, int val)
          Puts the given value in the set under the given key.
 Reiterator reiterator()
          Returns a Reiterator view.
 void set(int key, IntSet set)
          Assigns the given set to the given key.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeListIntRelation

public TreeListIntRelation()
Constructs the TreeListIntRelation.
Method Detail

keys

public IntSet keys()
Description copied from interface: IntRelation
Returns the set of keys.
Specified by:
keys in interface IntRelation

isEmpty

public boolean isEmpty()
Description copied from interface: IntRelation
Returns true if the set of keys is the empty set.
Specified by:
isEmpty in interface IntRelation

put

public void put(int key,
                int val)
Description copied from interface: IntRelation
Puts the given value in the set under the given key.
Specified by:
put in interface IntRelation

set

public void set(int key,
                IntSet set)
Description copied from interface: IntRelation
Assigns the given set to the given key.
Specified by:
set in interface IntRelation

get

public IntSet get(int key)
Description copied from interface: IntRelation
Returns the set under the given key.
Specified by:
get in interface IntRelation

reiterator

public Reiterator reiterator()
Description copied from interface: IntRelation
Returns a Reiterator view.
Specified by:
reiterator in interface IntRelation