|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Grid is a Collection implanted in a multidimensional array.
Grid contains get, put and take methods that use Addresses to find the correct location in the Grid. A Grid also supplies Iterators and asList methods that cut a stripe accross the grid in a single dimension.
Grid is a superinterface, and should have subinterfaces that specify more information about the Grid's dimentions.
Grids typically use the sameGridAs method to determine if two Grids have the same contents, and reserve equals() and hashCode() for identity.
Generally, null values are OK in Grids.
Method Summary | |
java.util.Iterator |
addressIterator()
Returns an Iterator of all the addresses in the grid. |
Address |
addressOf(java.lang.Object object)
Returns an Address in the Grid occupied by object. |
boolean |
containsAddress(Address address)
Returns true if the address is on this Grid. |
boolean |
containsDimension(Dimension dimension)
Returns true if dimension is used in this Grid. |
java.lang.Object |
get(Address address)
Return the Object at address. |
net.walend.enum.Enum |
getDimensions()
Returns the Dimensions enumerated type |
java.lang.Object |
getFillObject()
Return the fill object for this grid. |
Address |
maxAddress()
Return the address furthest from the origin for this grid. |
IndexedIterator |
stripeIterator(Address address,
Dimension dimensionToScan)
Returns an Iterator accross the stripe at Address, through dimensionToScan. |
Methods inherited from interface net.walend.collection.HasState |
getPrincipleInterface, sameStateAs |
Methods inherited from interface java.util.Collection |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Method Detail |
public java.lang.Object getFillObject()
public boolean containsDimension(Dimension dimension)
public net.walend.enum.Enum getDimensions()
public Address maxAddress()
public boolean containsAddress(Address address)
public java.lang.Object get(Address address) throws OffGridException
OffGridException
public Address addressOf(java.lang.Object object) throws ObjectNotOnGridException
ObjectNotOnGridException
public IndexedIterator stripeIterator(Address address, Dimension dimensionToScan)
public java.util.Iterator addressIterator()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |