CubeTwister 2.0alpha142 2012-02-11

ch.randelshofer.rubik.parser
Class NOPNode

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

public class NOPNode
extends Node

A No Operation Node holds no children. A NOP node has no side effect if applied to a cube.

Version:
1.1 2009-07-30 Added writeTokens method.
1.0 01 February 2005 Created.
Author:
Werner Randelshofer
See Also:
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
NOPNode(int layerCount)
          Creates a new instance.
NOPNode(int layerCount, int startpos, int endpos)
          Creates a new instance.
 
Method Summary
 void writeTokens(java.io.PrintWriter w, Notation notation, java.util.Map<java.lang.String,MacroNode> macroMap)
          Returns a string representation of this node using the specified notation.
 
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, toString, transform, transform, transformOrientation
 
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

NOPNode

public NOPNode(int layerCount)
Creates a new instance.


NOPNode

public NOPNode(int layerCount,
               int startpos,
               int endpos)
Creates a new instance.

Method Detail

writeTokens

public void writeTokens(java.io.PrintWriter w,
                        Notation notation,
                        java.util.Map<java.lang.String,MacroNode> macroMap)
                 throws java.io.IOException
Returns a string representation of this node using the specified notation.

Overrides:
writeTokens in class Node
Parameters:
w - This is where the tokens are written to.
notation - The notation which provides the tokens.
macroMap - Local macros which are preserved by the translation.
Throws:
java.io.IOException

(c) Werner Randelshofer.
All rights reserved.