net.walend.grid
Interface MutableGrid2D

All Superinterfaces:
java.util.Collection, Grid, Grid2D, HasState, MutableGrid
All Known Implementing Classes:
MutableArrayGrid2D, MutableMapGrid2D

public interface MutableGrid2D
extends MutableGrid, Grid2D

Grid2D is a simple two-dimensional Grid, indexed by (i,j).

Author:
David Walend dfw1@cornell.edu

Nested Class Summary
 
Nested classes inherited from class net.walend.grid.Grid2D
Grid2D.Dimensions2D
 
Field Summary
 
Fields inherited from interface net.walend.grid.Grid2D
DIMENSIONS2D, I, J
 
Method Summary
 java.lang.Object put(int i, int j, java.lang.Object object)
          Replaces the object at i,j with object.
 java.lang.Object take(int i, int j)
          Replaces the object at i,j with fill.
 
Methods inherited from interface net.walend.grid.MutableGrid
put, take
 
Methods inherited from interface net.walend.grid.Grid
addressIterator, addressOf, containsAddress, containsDimension, get, getDimensions, getFillObject, maxAddress, stripeIterator
 
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
 
Methods inherited from interface net.walend.grid.Grid2D
containsAddress, get, iStripeIterator, jStripeIterator, sameGrid2DAs, sizeI, sizeJ
 

Method Detail

put

public java.lang.Object put(int i,
                            int j,
                            java.lang.Object object)
                     throws OffGridException
Replaces the object at i,j with object.

Returns:
the object that was at i,j.
OffGridException

take

public java.lang.Object take(int i,
                             int j)
                      throws OffGridException
Replaces the object at i,j with fill.

Returns:
the object that was at i,j.
OffGridException


Copyright (c) 2001, 2002, David Walend