Internet Chess ToolKit
v0.2.0

ictk.boardgame.chess.net.ics
Class ICSAccountType

java.lang.Object
  extended byictk.boardgame.chess.net.ics.ICSAccountType

public class ICSAccountType
extends java.lang.Object

Every user on an ICS system may have different account attributes associated with it. These attributes are held in this object as flags for the account. Some flags are mutually exclusive on the server, but this object does not take that into account.


Field Summary
static int ADMIN
           
static int BLIND
           
static int CHESS_ADVISOR
           
static int COMPUTER
           
static int DEMO
           
static int DISPLAY_MANAGER
           
static int FM
           
static int GM
           
static int HELPER
           
static int IM
           
static int NUM_FLAGS
           
static int SERVICE_REP
           
static int TEAM
           
static int TOURNAMENT_DIRECTOR
           
static int TOURNAMENT_MANAGER
           
static int UNREGISTERED
           
static int WFM
           
static int WGM
           
static int WIM
           
 
Constructor Summary
ICSAccountType()
           
ICSAccountType(java.lang.String s)
           
 
Method Summary
 boolean is(int type)
          tests to see if a particular lfag is set to true or not.
 void set(int type, boolean t)
          sets a flag either on or off.
 void set(java.lang.String s)
          converts a string in the format "(SR)(TM)" to set the currect flags.
 java.lang.String toString()
          converts the account flags into their string representation.
static java.lang.String typeToString(int type)
          converts a flag into its string representation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNREGISTERED

public static final int UNREGISTERED
See Also:
Constant Field Values

COMPUTER

public static final int COMPUTER
See Also:
Constant Field Values

BLIND

public static final int BLIND
See Also:
Constant Field Values

TEAM

public static final int TEAM
See Also:
Constant Field Values

ADMIN

public static final int ADMIN
See Also:
Constant Field Values

SERVICE_REP

public static final int SERVICE_REP
See Also:
Constant Field Values

HELPER

public static final int HELPER
See Also:
Constant Field Values

CHESS_ADVISOR

public static final int CHESS_ADVISOR
See Also:
Constant Field Values

TOURNAMENT_MANAGER

public static final int TOURNAMENT_MANAGER
See Also:
Constant Field Values

TOURNAMENT_DIRECTOR

public static final int TOURNAMENT_DIRECTOR
See Also:
Constant Field Values

DISPLAY_MANAGER

public static final int DISPLAY_MANAGER
See Also:
Constant Field Values

WFM

public static final int WFM
See Also:
Constant Field Values

FM

public static final int FM
See Also:
Constant Field Values

WIM

public static final int WIM
See Also:
Constant Field Values

IM

public static final int IM
See Also:
Constant Field Values

WGM

public static final int WGM
See Also:
Constant Field Values

GM

public static final int GM
See Also:
Constant Field Values

DEMO

public static final int DEMO
See Also:
Constant Field Values

NUM_FLAGS

public static final int NUM_FLAGS
See Also:
Constant Field Values
Constructor Detail

ICSAccountType

public ICSAccountType()

ICSAccountType

public ICSAccountType(java.lang.String s)
               throws java.io.IOException
Method Detail

set

public void set(int type,
                boolean t)
sets a flag either on or off.


is

public boolean is(int type)
tests to see if a particular lfag is set to true or not.


set

public void set(java.lang.String s)
         throws java.io.IOException
converts a string in the format "(SR)(TM)" to set the currect flags.

Throws:
java.io.IOException - if an account type isn't recognized.

typeToString

public static java.lang.String typeToString(int type)
converts a flag into its string representation. For example: SERVICE_REP will return "SR"


toString

public java.lang.String toString()
converts the account flags into their string representation. Such as "(SR)(TM)"


Submit a bug or feature
Visit the Website
Internet Chess ToolKit is licensed under the GPL v2 .