|
Internet Chess ToolKit v0.2.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ictk.boardgame.chess.io.NAG
Numeric Annotation Glyph (NAG) - this class is used to translate,
and parse, NAG into verbose annotations. The verbose annotations
can be fed by Locale specific resource bundles. The NAGs supported
are the offical standard NAGs, the Informant proposed NAGs (N, RR),
and the Scid NAGs (D).
NOTE: if your native language is not available and you'd like to
contribute it please send me a translation.
Field Summary | |
static short |
MAX_NAG
|
Constructor Summary | |
NAG()
|
|
NAG(java.util.Locale locale)
|
Method Summary | |
java.util.Locale |
getLocale()
NOT IMPLEMENTED YET |
static boolean |
isSuffix(int s)
checks to see if the NAG is qualified to be a suffix for a move. |
static boolean |
isSuffix(java.lang.String str)
checks to see if the NAG is qualified to be a suffix for a move. |
static boolean |
isSymbol(int s)
checks to see if the number matches of the recognized symbols. |
static boolean |
isSymbol(java.lang.String str)
checks to see if the String exactly matches of the recognized symbols. |
java.lang.String |
numberToDescription(int nag)
converts a NAG into its verbose string interpretation |
static java.lang.String |
numberToString(int nag)
translates the NAG number into its String representation. |
static java.lang.String |
numberToString(int nag,
boolean allNumeric)
translates the NAG number into its String representation. |
boolean |
setLocale(java.util.Locale locale)
NOT IMPLEMENTED YET |
static short |
stringToNumber(java.lang.String str)
converts move suffix annotations to their NAG values. |
static short[] |
stringToNumbers(java.lang.String s)
|
static short |
symbolToNumber(java.lang.String str)
Similar to stringToNumber() but only works for recognized symbols. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static short MAX_NAG
Constructor Detail |
public NAG()
public NAG(java.util.Locale locale)
Method Detail |
public boolean setLocale(java.util.Locale locale)
public java.util.Locale getLocale()
public static short[] stringToNumbers(java.lang.String s)
public static short stringToNumber(java.lang.String str)
public static boolean isSuffix(java.lang.String str)
public static boolean isSuffix(int s)
public static boolean isSymbol(int s)
public static boolean isSymbol(java.lang.String str)
public static short symbolToNumber(java.lang.String str)
public static java.lang.String numberToString(int nag)
public static java.lang.String numberToString(int nag, boolean allNumeric)
allNumeric
- if true will only return the numeric format.
If false will return symbols and numbers.
public java.lang.String numberToDescription(int nag)
|
Submit a bug or feature Visit the Website Internet Chess ToolKit is licensed under the GPL v2 . |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |