Class Substitution

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--Substitution
All Implemented Interfaces:
Cloneable, Map, Serializable

public class Substitution
extends Hashtable

This class represents a substitution map between nodes.

Author:
P. URSO
See Also:
Node, Serialized Form

Inner classes inherited from class java.util.Map
Map.Entry
 
Constructor Summary
Substitution()
          Constructs a new, empty substitution map.
Substitution(Node from, Node to)
          Constructs a new substitution map with only one mapping and very little capacity.
 
Method Summary
 Node getImage(Object node)
          Returns the node to which the specified node is mapped.
static Substitution makeFilter(Node from, Node to)
          Returns a filter between two nodes, if possible.
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Substitution

public Substitution()
Constructs a new, empty substitution map.

Substitution

public Substitution(Node from,
                    Node to)
Constructs a new substitution map with only one mapping and very little capacity.
Parameters:
from - the origin node.
from - the image node.
Method Detail

getImage

public Node getImage(Object node)
Returns the node to which the specified node is mapped.
Parameters:
node - the node.
Returns:
the node to which the specified node is mapped.

makeFilter

public static Substitution makeFilter(Node from,
                                      Node to)
Returns a filter between two nodes, if possible.
Parameters:
from - the origin node.
to - the image node.
Returns:
the substitution map if such a filter exists, null otherwise.