|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--PlayerLoader
Class to load a Player from a pml file. This is based closely upon mml.
MapLoader,
Player| Field Summary | |
protected boolean |
fin
Finished marker |
| Constructor Summary | |
PlayerLoader(java.io.BufferedReader br)
Construct a new PlayerLoader using the BufferedReader specified. |
|
| Method Summary | |
Player |
getPlayer()
Gets the Player created |
protected boolean |
isChar(int c)
Returns true iff is between A and Z case-insensitive. |
protected void |
processBadge(java.io.BufferedReader br,
Player p)
Handles the Badge for the Player |
protected Item |
processItemForVector(java.io.BufferedReader br)
Handles the Item for the Item Vector |
protected void |
processItemVector(java.io.BufferedReader br,
Player p)
Handles the Item Vector of the Player |
protected Monster |
processMonster(java.io.BufferedReader br)
Handles the Monster for the Monster Vector |
protected void |
processMonsterVector(java.io.BufferedReader br,
Player p,
boolean hand)
Handles the Monster Vector of the Player |
protected void |
startReading()
Starts reading from the file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected boolean fin
| Constructor Detail |
public PlayerLoader(java.io.BufferedReader br)
throws java.io.IOException,
InvalidFileFormatException
br - the BufferedReader to load from
InvalidFileFormatException - if the file is not a proper pml document
java.io.IOException| Method Detail |
public Player getPlayer()
Playerprotected boolean isChar(int c)
c - the charactr to compare
protected void startReading()
throws java.io.IOException,
InvalidFileFormatException
InvalidFileFormatException - if the file is not a proper pml document
java.io.IOException
protected void processMonsterVector(java.io.BufferedReader br,
Player p,
boolean hand)
throws java.io.IOException,
InvalidFileFormatException
br - Read fromp - the Player to add to
InvalidFileFormatException - if the file is not a proper pml document
java.io.IOExceptionPlayer
protected Monster processMonster(java.io.BufferedReader br)
throws java.io.IOException,
InvalidFileFormatException
br - the BufferedReader to read from
InvalidFileFormatException - if the file is not a proper pml document
java.io.IOExceptionMonster
protected void processItemVector(java.io.BufferedReader br,
Player p)
throws java.io.IOException,
InvalidFileFormatException
br - Read fromp - the Player to add to
InvalidFileFormatException - if the file is not a proper pml document
java.io.IOExceptionPlayer
protected Item processItemForVector(java.io.BufferedReader br)
throws java.io.IOException,
InvalidFileFormatException
br - the BufferedReader to read from
InvalidFileFormatException - if the file is not a proper pml document
java.io.IOExceptionItem
protected void processBadge(java.io.BufferedReader br,
Player p)
throws java.io.IOException,
InvalidFileFormatException
br - the BufferedReader to read fromp - the Player to add the Badges to
InvalidFileFormatException - if the file is not a proper pml document
java.io.IOExceptionPlayer,
Trainer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||