ca.quine.jcommons.transform.transforms
Class Position
java.lang.Object
|
+--ca.quine.jcommons.transform.transforms.Position
- public class Position
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Position
public Position(SegmentList segmentList,
int position)
currentSegment
public SegmentStructure currentSegment()
nextPosition
public int nextPosition()
copy
public Position copy()
nextSibling
public boolean nextSibling()
- Moves the position to the next sibling, and
returns true if there is a next sibling.
nextChild
public boolean nextChild()
hasNext
public boolean hasNext(SegmentList outerList)
isLastChild
public boolean isLastChild()
hasParent
public boolean hasParent()
moveToParent
public void moveToParent()
nextPositionNoRepeats
public int nextPositionNoRepeats()
- If called repeatedly from the first segment position, each segment
will be visited exactly once, in the order given in the segment-map
file.
- Returns:
- the new level, or Integer.MAX_VALUE if there is no next
position
addTransitions
public void addTransitions(Map stateMap,
String stateName)
- Add all legal transitions from the starting state except for
self-referential ones. We'll handle those later.
- Parameters:
stateMap
- stateName
-
parent
public static String parent(int level,
String stateName)
parent
public static String parent(String prefix)
hasRequiredChild
public boolean hasRequiredChild()