com.editev.chess
Class Boards
java.lang.Object
|
+--com.editev.util.Lists
|
+--com.editev.chess.Boards
- public class Boards
- extends com.editev.util.Lists
A growing, unsynchronized list of Boards.
- See Also:
the source here.
| Inner classes inherited from class com.editev.util.Lists |
com.editev.util.Lists.Bytes,
com.editev.util.Lists.Chars,
com.editev.util.Lists.Ints,
com.editev.util.Lists.Shorts |
| Fields inherited from class com.editev.util.Lists |
length,
list,
resize |
|
Constructor Summary |
Boards()
Creates an empty Board with the default capacity. |
Boards(int capacity)
Creates an empty Board with the specified capacity. |
|
Method Summary |
void |
append(Board board)
Puts a Board at the end of the list. |
void |
clear()
Clears the list of Boards. |
Board |
getAt(int i)
|
protected int |
getCapacity()
get the possible capacity of the current list. |
protected Board[] |
getList()
|
protected java.lang.Object |
newList(int capacity)
Actually allocates a new list of the right class and size. |
java.lang.String |
toString()
Represent all these boards for debugging purposes. |
| Methods inherited from class com.editev.util.Lists |
checkList,
getLength,
listCopy,
makeList,
makeList,
setCapacity,
setLength |
| Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
Boards
public Boards()
- Creates an empty Board with the default capacity.
Boards
public Boards(int capacity)
- Creates an empty Board with the specified capacity.
newList
protected java.lang.Object newList(int capacity)
- Actually allocates a new list of the right class and size.
- Overrides:
- newList in class com.editev.util.Lists
getList
protected Board[] getList()
- Returns:
- the list as an array of Board Objects.
getCapacity
protected int getCapacity()
- Description copied from class: com.editev.util.Lists
- get the possible capacity of the current list.
- Overrides:
- getCapacity in class com.editev.util.Lists
- Returns:
- the possibly capacity of the list -- if you want the length, use Lists.getLength().
getAt
public Board getAt(int i)
- Parameters:
i - index of the Board.- Returns:
- the Board at a given integer index.
- Throws:
- ArrayIndexOutOfBoundsException - if the index is not less than getLength()
append
public void append(Board board)
- Puts a Board at the end of the list.
- Parameters:
board - Board to append.
clear
public void clear()
- Clears the list of Boards.
- Overrides:
- clear in class com.editev.util.Lists
toString
public java.lang.String toString()
- Represent all these boards for debugging purposes.
- Overrides:
- toString in class java.lang.Object