|
CubeTwister 2.0alpha142 2012-02-11 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.randelshofer.rubik.parser.CubeMarkupNotation
public class CubeMarkupNotation
CubeMarkupNotation reads its notation definition from a CubeMarkup XML 3 file.
| Constructor Summary | |
|---|---|
CubeMarkupNotation(Cube cube)
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
configureMoveFromToken(MoveNode twist,
java.lang.String twistToken)
Configures a MoveNode from the specified move token. |
void |
dumpNotation()
|
java.lang.String |
getEquivalentMacro(Cube cube,
java.util.Map localMacros)
Returns a macro which performs the same transformation as the cube parameter. |
int |
getLayerCount()
Returns the number of layers supported by this notation. |
java.util.List<MacroNode> |
getMacros()
Returns the macros defined by this notation. |
java.lang.String |
getName()
|
Symbol |
getSymbolFor(java.lang.String token,
Symbol compositeSymbol)
Returns a symbol for the specified token. |
Syntax |
getSyntax(Symbol s)
Returns the syntax for the specified symbol. |
java.lang.String |
getToken(Move s)
Returns a token for the specified move. |
java.lang.String |
getToken(Symbol s)
Returns a token for the specified symbol. |
boolean |
isSupported(Symbol s)
Returns true, if this notation supports the specified symbol. |
boolean |
isToken(java.lang.String token)
Returns true, if the specified String is a token of this notation. |
boolean |
isTokenFor(java.lang.String token,
Symbol symbol)
Returns true, if the specified String is a token for the specified symbol. |
void |
readXML(nanoxml.XMLElement doc)
Configures this CubeMarkupNotation by the default Notation found in the XMLElement. |
void |
readXML(nanoxml.XMLElement doc,
java.lang.String notationName)
Configures this CubeMarkupNotation by the first Notation element found in the XMLElement which has the specified notation name. |
java.lang.String |
toVerboseString()
|
void |
writeToken(java.io.PrintStream w,
Symbol symbol)
|
void |
writeToken(java.io.PrintWriter w,
int axis,
int layerMask,
int angle)
Writes a token for the specified transformation to the print writer. |
void |
writeToken(java.io.PrintWriter w,
Symbol symbol)
Writes a token for the specified symbol to the print writer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CubeMarkupNotation(Cube cube)
| Method Detail |
|---|
public void readXML(nanoxml.XMLElement doc)
throws nanoxml.XMLParseException
nanoxml.XMLParseException
public void readXML(nanoxml.XMLElement doc,
java.lang.String notationName)
throws nanoxml.XMLParseException
nanoxml.XMLParseExceptionpublic java.lang.String toVerboseString()
public void configureMoveFromToken(MoveNode twist,
java.lang.String twistToken)
Notation
configureMoveFromToken in interface Notationpublic java.lang.String getName()
public java.lang.String getEquivalentMacro(Cube cube,
java.util.Map localMacros)
Notation
getEquivalentMacro in interface Notationcube - A transformed cube.localMacros - A Map with local macros.
public Symbol getSymbolFor(java.lang.String token,
Symbol compositeSymbol)
Notation
getSymbolFor in interface Notationpublic Syntax getSyntax(Symbol s)
Notation
getSyntax in interface Notationpublic java.lang.String getToken(Symbol s)
Notation
getToken in interface Notationpublic boolean isSupported(Symbol s)
Notation
isSupported in interface Notationpublic boolean isToken(java.lang.String token)
Notation
isToken in interface Notation
public boolean isTokenFor(java.lang.String token,
Symbol symbol)
isTokenFor in interface Notation
public void writeToken(java.io.PrintWriter w,
Symbol symbol)
throws java.io.IOException
Notation
writeToken in interface Notationjava.io.IOException - If the symbol is not supported by the notation,
and if no alternative symbols could be found.
public void writeToken(java.io.PrintStream w,
Symbol symbol)
public void writeToken(java.io.PrintWriter w,
int axis,
int layerMask,
int angle)
throws java.io.IOException
Notation
writeToken in interface Notationjava.io.IOExceptionpublic void dumpNotation()
public int getLayerCount()
Notation
getLayerCount in interface Notationpublic java.lang.String getToken(Move s)
Notation
getToken in interface Notationpublic java.util.List<MacroNode> getMacros()
Notation
getMacros in interface Notation
|
(c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||