|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--net.walend.grid.AbstractMapGrid2D
|
+--net.walend.grid.MapGrid2D
Grid2D is a simple two-dimensional Grid.
| Nested Class Summary |
| Nested classes inherited from class net.walend.grid.AbstractMapGrid2D |
|
| Nested classes inherited from class net.walend.grid.Grid2D |
Grid2D.Dimensions2D |
| Field Summary |
| Fields inherited from class net.walend.grid.AbstractMapGrid2D |
|
| Fields inherited from interface net.walend.grid.Grid2D |
DIMENSIONS2D, I, J |
| Constructor Summary | |
MapGrid2D(Address2D maxAddress,
Grid2D grid)
|
|
MapGrid2D(Grid2D grid)
|
|
MapGrid2D(int sizeI,
int sizeJ,
Grid2D grid)
|
|
| Method Summary | |
boolean |
add(java.lang.Object o)
Throws an UnsupportedOperationException. |
boolean |
addAll(java.util.Collection c)
Throws an UnsupportedOperationException. |
void |
clear()
Replaces all of the elements with fill. |
IndexedIterator |
iStripeIterator(int i)
Returns an iterator accross zs at i. |
java.util.Iterator |
iterator()
Returns an iterator over the elements in this collection. |
IndexedIterator |
jStripeIterator(int j)
Returns an iterator accross is at j. |
boolean |
remove(java.lang.Object o)
Removes a single instance of the specified element from this collection, if it is present (optional operation). |
boolean |
removeAll(java.util.Collection c)
Removes all this collection's elements that are also contained in the specified collection (optional operation). |
boolean |
retainAll(java.util.Collection c)
Retains only the elements in this collection that are contained in the specified collection (optional operation). |
IndexedIterator |
stripeIterator(Address address,
Dimension dimensionToScan)
Returns an Iterator accross the stripe at Address, through dimensionToScan. |
| Methods inherited from class net.walend.grid.AbstractMapGrid2D |
addressIterator, addressOf, checkAddress, contains, containsAddress, containsAddress, containsAll, containsDimension, get, get, getDimensions, getFillObject, getPrincipleInterface, isEmpty, maxAddress, put, put, sameGrid2DAs, sameStateAs, size, sizeI, sizeJ, take, take, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Collection |
equals, hashCode |
| Constructor Detail |
public MapGrid2D(Grid2D grid)
throws OffGridException
public MapGrid2D(Address2D maxAddress,
Grid2D grid)
throws OffGridException
public MapGrid2D(int sizeI,
int sizeJ,
Grid2D grid)
throws OffGridException
| Method Detail |
public java.util.Iterator iterator()
iterator in interface java.util.Collectioniterator in class AbstractMapGrid2Dpublic boolean add(java.lang.Object o)
add in interface java.util.Collectionadd in class AbstractMapGrid2Dpublic boolean remove(java.lang.Object o)
This method has to scan the array to find the element to remove.
Removing the fill object always returns false. Either the Grid doesn't contain the object, or removing one (replacing it with the fill object) won't change the Grid.
remove in interface java.util.Collectionremove in class AbstractMapGrid2Do - element to be removed from this collection, if present.
public boolean addAll(java.util.Collection c)
addAll in interface java.util.CollectionaddAll in class AbstractMapGrid2Dpublic boolean removeAll(java.util.Collection c)
Because this method replaces every object it removes with the fill object, putting the fill object in the collection won't get rid of it.
removeAll in interface java.util.CollectionremoveAll in class AbstractMapGrid2Dc - elements to be removed from this collection.
java.lang.UnsupportedOperationException - if the removeAll method
is not supported by this collection.remove(Object),
AbstractMapGrid2D.contains(Object)public boolean retainAll(java.util.Collection c)
Because this method replaces every object it removes with the fill object, leaving the fill object out of the collection won't get rid of it.
retainAll in interface java.util.CollectionretainAll in class AbstractMapGrid2Dc - elements to be retained in this collection.
java.lang.UnsupportedOperationException - if the retainAll method
is not supported by this Collection.remove(Object),
AbstractMapGrid2D.contains(Object)public void clear()
clear in interface java.util.Collectionclear in class AbstractMapGrid2Djava.lang.UnsupportedOperationException - if the clear method is
not supported by this collection.
public IndexedIterator stripeIterator(Address address,
Dimension dimensionToScan)
stripeIterator in interface GridstripeIterator in class AbstractMapGrid2D
public IndexedIterator iStripeIterator(int i)
throws OffGridException
iStripeIterator in interface Grid2DiStripeIterator in class AbstractMapGrid2DOffGridException
public IndexedIterator jStripeIterator(int j)
throws OffGridException
jStripeIterator in interface Grid2DjStripeIterator in class AbstractMapGrid2DOffGridException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||