|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--java.util.Vector
|
+--com.strangelight.misc.hex.HexPath
A List of HexLocation objects.
Note: although the current implementation subclasses
Vector, this could change in the future; the List interface is the only one guaranteed to be supported
in future versions.
| Field Summary | |
static int |
MAX_PATH_LENGTH
the maximum legal HexPath length. |
| Fields inherited from class java.util.Vector |
capacityIncrement, elementCount, elementData |
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
HexPath()
|
|
| Method Summary | |
boolean |
add(java.lang.Object location)
adds a HexLocation object to the end of this HexPath. |
java.lang.String |
toString()
|
| Methods inherited from class java.util.Vector |
add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
iterator, listIterator, listIterator |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray |
| Field Detail |
public static final int MAX_PATH_LENGTH
For robustness, HexPath objects will not allow themselves to get arbitrarily long. [This value is currently hardcoded at 1000, but eventually implementations should calculate this value as a function of the maximum allowable BOARD size.]
java.lang.List#size(),
Constant Field Values| Constructor Detail |
public HexPath()
| Method Detail |
public java.lang.String toString()
toString in class java.util.Vectorpublic boolean add(java.lang.Object location)
add in interface java.util.Listadd in class java.util.Vectorlocation - the HexLocation object to add to
this path.
java.lang.ClassCastException - if location is not a
HexLocation.
E_Unexpected - if this HexPath already has
MAX_PATH_LENGTH HexLocations.MAX_PATH_LENGTH
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||