|
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.DefaultNotation
public class DefaultNotation
DefaultNotation supports Superset ENG. FIXME - This class is incomplete. It currently only works with a 3x3 Rubiks Cube.
| Constructor Summary | |
|---|---|
DefaultNotation()
Creates a new instance. |
|
DefaultNotation(int layerCount)
|
|
| Method Summary | |
|---|---|
void |
configureMoveFromToken(MoveNode move,
java.lang.String moveToken)
Configures a MoveNode from the specified move token. |
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. |
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 |
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 DefaultNotation()
public DefaultNotation(int layerCount)
| Method Detail |
|---|
public int getLayerCount()
Notation
getLayerCount in interface Notation
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 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.PrintWriter w,
int axis,
int layerMask,
int angle)
throws java.io.IOException
Notation
writeToken in interface Notationjava.io.IOExceptionpublic boolean isSupported(Symbol s)
Notation
isSupported in interface Notationpublic Syntax getSyntax(Symbol s)
Notation
getSyntax in interface Notationpublic boolean isToken(java.lang.String token)
Notation
isToken in interface Notation
public boolean isTokenFor(java.lang.String token,
Symbol symbol)
Notation
isTokenFor in interface Notationpublic java.lang.String getToken(Symbol s)
Notation
getToken in interface Notation
public Symbol getSymbolFor(java.lang.String token,
Symbol compositeSymbol)
Notation
getSymbolFor in interface Notation
public void configureMoveFromToken(MoveNode move,
java.lang.String moveToken)
Notation
configureMoveFromToken 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 | ||||||||