edu.vt.marian.common
Class LinkDesc
java.lang.Object
|
+--edu.vt.marian.common.LinkDesc
- public class LinkDesc
- extends java.lang.Object
At the moment, we are only allowing a link description to consist of an exact
description of a single link. Future implementations may allow link
variables and link operators. A single link is fully described by
specifying its type and describing the nodes at source end and sink
end. In the current context, we know the description of the node at
one end (the "target" end): that is the node described in the node
portion of some InfoDesc. The node at the other end (the "key" end)
is described by a further InfoDesc. Thus each member of the linkDesc
Vector is composed of three elements:
- linkClassID -- the class of the link traversed
- direction -- whether the target is source or sink
- keyDesc -- the description of the key node
- See Also:
InfoDesc
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
debug
protected Debug debug
- Just for debugging
classID
protected int classID
direction
protected int direction
keyDesc
protected InfoDesc keyDesc
INVALID_DIRECTION
public static final int INVALID_DIRECTION
- The possible directions.
SOURCE_TO_SINK
public static final int SOURCE_TO_SINK
SINK_TO_SOURCE
public static final int SINK_TO_SOURCE
ANY_DIRECTION
public static final int ANY_DIRECTION
LinkDesc
public LinkDesc(Debug d)
- Create a new null LinkDesc.
- Parameters:
d
- -- the eternal Debug object.
LinkDesc
public LinkDesc(int linkClID,
int dir,
InfoDesc key,
Debug d)
- Create a new LinkDesc from full specifications.
- Parameters:
linkClID
- (possibly super-) class for matching links.dir
- direction for links to run.key
- InfoDesc for node at other end of link.d
- the eternal Debug object.
isValid
public boolean isValid()
isValidDirection
public static boolean isValidDirection(int dir)
- A little utility.
setClassID
public void setClassID(int linkClID)
getClassID
public int getClassID()
setDirection
public void setDirection(int dir)
getDirection
public int getDirection()
setKeyDesc
public void setKeyDesc(InfoDesc key)
getKeyDesc
public InfoDesc getKeyDesc()