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
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. |
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 |
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.
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.