|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.AbstractCollection | +--java.util.AbstractList | +--java.util.Vector | +--noope.core.Laws
This class maintains a list of Law objects. It is a subclass of Vector, and as such it implements the List interface. In addition to the normal Vector element accessor methods, Law objects are referable by a String name, using the getLaw(String) method - this is only used when initialising the LawPropertyRecords of Entity objects. The Law objects to be stored are constructed and added to the Laws object by the Physics() constructor, using a BlockReader.
Fields inherited from class java.util.Vector |
capacityIncrement, elementCount, elementData |
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary | |
Laws(BlockReader br,
Physics phys)
Constructs the Laws object from the supplied BlockReader. |
Method Summary | |
void |
dispose()
Disposes of resources by calling dispose() on each of the Laws stored in the List. |
Law |
getLaw(java.lang.String lawname)
Return a Law identified by the a string, or throw a LawNotFoundException if this Law does not exist. |
Methods inherited from class java.util.Vector |
add, 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, toString, 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 |
iterator, listIterator, listIterator |
Constructor Detail |
public Laws(BlockReader br, Physics phys) throws BRLoadingException
br
- BlockReader used to read in the Law objectsphys
- Physics object passed on to Law() constructorsBRLoadingException
- if invalid data is read from the BlockReaderLaw.Law(BlockReader, int, Physics)
Method Detail |
public Law getLaw(java.lang.String lawname) throws LawNotFoundException
lawname
- search for a Law whose getName() returns lawnameLawNotFoundException
- if the Law is not foundpublic void dispose()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |