CubeTwister 2.0alpha142 2012-02-11

ch.randelshofer.rubik.parser
Class SequenceNode

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by ch.randelshofer.rubik.parser.Node
          extended by ch.randelshofer.rubik.parser.SequenceNode
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode
Direct Known Subclasses:
RotationNode

public class SequenceNode
extends Node

A SequenceNode holds a sequence of statements as its children A. The side effect of a script node to a Cube is A.

Version:
6.0 2009-01-24 Renamed from ScriptNode to SequenceNode.
5.0 2005-01-31 Reworked.
1.1 2004-02-25 Method overwritePositions added.
1.0.1 2002-05-17 NPE in enumerateChildrenReversed fixed.
1.0 2001-07-25
Author:
Werner Randelshofer, Hausmatt 10, Immensee, CH-6405, Switzerland
See Also:
ScriptParser, Serialized Form

Field Summary
 
Fields inherited from class ch.randelshofer.rubik.parser.Node
endpos, layerCount, startpos, symbol
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
SequenceNode(int layerCount)
          Creates a script node with start position = 0 and end position = 0.
SequenceNode(int layerCount, int startpos, int endpos)
          Creates a script node which represents a symbol at the indicated position in the source code.
 
Method Summary
 java.lang.String toString()
          Returns a string representation of this node.
 
Methods inherited from class ch.randelshofer.rubik.parser.Node
applyTo, cloneSubtree, dumpTree, enumerateChildrenReversed, getBlockTurnCount, getChildAt, getChildren, getEndPosition, getFaceTurnCount, getLayerTurnCount, getQuarterTurnCount, getStartPosition, getSymbol, inverse, overwritePositions, reflect, resolvedEnumeration, setEndPosition, setStartPosition, toResolvedList, toString, toString, transform, transform, transformOrientation, writeTokens
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SequenceNode

public SequenceNode(int layerCount)
Creates a script node with start position = 0 and end position = 0.


SequenceNode

public SequenceNode(int layerCount,
                    int startpos,
                    int endpos)
Creates a script node which represents a symbol at the indicated position in the source code.

Parameters:
startpos - The start position of the symbol.
endpos - The end position of the symbol.
Method Detail

toString

public java.lang.String toString()
Description copied from class: Node
Returns a string representation of this node. Use for debugging only.

Overrides:
toString in class Node

(c) Werner Randelshofer.
All rights reserved.