net.sourceforge.foobase
Class CBFGameID
java.lang.Object
|
+--net.sourceforge.foobase.CBFGameID
- public class CBFGameID
- extends java.lang.Object
- implements IsGameID
Implements a game-ID for old-style chessbase databases.
Field Summary |
static java.lang.String |
__version
|
protected CBFDatabase |
_db
Database containing the game |
protected int |
_id
Game number in database. |
Method Summary |
boolean |
equals(java.lang.Object o)
Test for equality of two game ID's. |
IsGameDatabase |
getDatabase()
Retrieve the implementing database for which this unique ID is valid. |
int |
getGameID()
Retrieve game number in database. |
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
_db
protected CBFDatabase _db
- Database containing the game
_id
protected int _id
- Game number in database.
First game is game number zero.
__version
public static final java.lang.String __version
CBFGameID
public CBFGameID(CBFDatabase db,
int id)
- Public constructor.
- Parameters:
db
- CBFDatabase
containing the gameid
- int
containing the game number (first game is
game zero)
getDatabase
public IsGameDatabase getDatabase()
- Retrieve the implementing database for which this unique ID is valid.
- Specified by:
- getDatabase in interface IsGameID
- Returns:
IsGameDatabase
that provided this unique ID.
getGameID
public int getGameID()
- Retrieve game number in database.
- Returns:
int
zero based game number in database.
equals
public boolean equals(java.lang.Object o)
- Test for equality of two game ID's.
- Overrides:
- equals in class java.lang.Object
- Parameters:
o
- Object
to test for equality- Returns:
boolean
value true
if o
represents the same game as the current object.