com.editev.chess
Class Moves

java.lang.Object
  |
  +--com.editev.util.Lists
        |
        +--com.editev.chess.Moves

public class Moves
extends com.editev.util.Lists

A growing, unsynchronized list of Move Objects.

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
Moves()
          Creates an empty Move with the default capacity.
Moves(int capacity)
          Creates an empty Move with the specified capacity.
 
Method Summary
 void append(Move move)
          Puts a Move at the end of the list.
 Move getAt(int i)
           
protected  int getCapacity()
          get the possible capacity of the current list.
protected  Move[] getList()
           
protected  java.lang.Object newList(int capacity)
          Actually allocates a new list of the right class and size.
 
Methods inherited from class com.editev.util.Lists
checkList, clear, getLength, listCopy, makeList, makeList, setCapacity, setLength
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

Moves

public Moves()
Creates an empty Move with the default capacity.

Moves

public Moves(int capacity)
Creates an empty Move with the specified capacity.
Method Detail

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 Move[] getList()
Returns:
the list as an array of Move 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 Move getAt(int i)
Parameters:
i - index of the Move.
Returns:
the Move at a given integer index.
Throws:
ArrayIndexOutOfBoundsException - if the index is not less than getLength()

append

public void append(Move move)
Puts a Move at the end of the list.
Parameters:
move - Move to append.