|
Internet Chess ToolKit v0.2.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectictk.boardgame.chess.net.ics.event.ICSEventParser
Parses server messages and produces ICSEvent objects. All parsers implement the Singleton design pattern.
| Field Summary | |
static long |
DEBUG
|
static java.lang.String |
REGEX_date
|
| Method Summary | |
abstract void |
assignMatches(java.util.regex.Matcher m,
ICSEvent evt)
Takes the data from the Matcher object and assigns them to the data fields of the ICSEvent object. |
ICSEvent |
createICSEvent(java.lang.CharSequence s)
Instantiates a new ICSEvent of the appropriate type for this parser if and only if the CharSequence matches something this parser can understand. |
abstract ICSEvent |
createICSEvent(java.util.regex.Matcher match)
Instantiantes a new ICSEvent of the appropriate type for this parser. |
boolean |
detectFake(java.lang.CharSequence s)
Is this ICSEvent something faked by a Bot? |
int |
getEventType()
returns the event type this parser corrisponds to |
java.util.regex.Pattern |
getPattern()
returns the pattern being used for this EventParser |
java.util.regex.Matcher |
match(java.lang.CharSequence s)
This method detects if the input CharSequence is a message of the type this parser can handle. |
void |
setDebug(boolean t)
turns debugging on for this parser. |
abstract java.lang.String |
toNative(ICSEvent evt)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final long DEBUG
public static final java.lang.String REGEX_date
| Method Detail |
public void setDebug(boolean t)
public java.util.regex.Pattern getPattern()
public int getEventType()
public java.util.regex.Matcher match(java.lang.CharSequence s)
s - is the CharSequence containing the Event this parser handles
public ICSEvent createICSEvent(java.lang.CharSequence s)
public abstract ICSEvent createICSEvent(java.util.regex.Matcher match)
public abstract void assignMatches(java.util.regex.Matcher m,
ICSEvent evt)
exceptions - if you pass in the wrong type of ICSEvent for this
parser, or a bad matcher. This is obviously loose coupling
--caveat programmerpublic boolean detectFake(java.lang.CharSequence s)
public abstract java.lang.String toNative(ICSEvent evt)
|
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 | |||||||||