net.walend.grid
Class MutableArrayGrid2D
java.lang.Object
|
+--net.walend.grid.AbstractArrayGrid2D
|
+--net.walend.grid.MutableArrayGrid2D
- All Implemented Interfaces:
- java.util.Collection, Grid, Grid2D, HasState, MutableGrid, MutableGrid2D, java.io.Serializable
- public class MutableArrayGrid2D
- extends AbstractArrayGrid2D
- implements MutableGrid2D, java.io.Serializable
MutableGrid2D is a simple two-dimensional Grid that you can put and take.
- Author:
- David Walend dfw1@cornell.edu
- See Also:
- Serialized Form
Method Summary |
java.lang.Object |
put(Address address,
java.lang.Object object)
Replace the Object at address with object. |
java.lang.Object |
put(int i,
int j,
java.lang.Object object)
Replaces the object at i,j with object. |
java.lang.Object |
take(Address address)
Replace the Object at Address with fill. |
java.lang.Object |
take(int i,
int j)
Replaces the object at i,j with fill. |
Methods inherited from class net.walend.grid.AbstractArrayGrid2D |
add, addAll, addressIterator, addressOf, checkAddress, clear, contains, containsAddress, containsAddress, containsAll, containsDimension, get, get, getDimensions, getFillObject, getPrincipleInterface, isEmpty, iStripeIterator, iterator, jStripeIterator, maxAddress, remove, removeAll, retainAll, sameGrid2DAs, sameStateAs, size, sizeI, sizeJ, stripeIterator, 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 |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
MutableArrayGrid2D
public MutableArrayGrid2D(int sizeI,
int sizeJ,
java.lang.Object fill)
throws OffGridException
MutableArrayGrid2D
public MutableArrayGrid2D(int sizeI,
int sizeJ)
throws OffGridException
MutableArrayGrid2D
public MutableArrayGrid2D(Address2D maxAddress)
throws OffGridException
MutableArrayGrid2D
public MutableArrayGrid2D(Address2D maxAddress,
java.lang.Object fill)
throws OffGridException
MutableArrayGrid2D
public MutableArrayGrid2D(Grid2D grid)
throws OffGridException
MutableArrayGrid2D
public MutableArrayGrid2D(Address2D maxAddress,
Grid2D grid)
throws OffGridException
MutableArrayGrid2D
public MutableArrayGrid2D(int sizeI,
int sizeJ,
Grid2D grid)
throws OffGridException
put
public java.lang.Object put(Address address,
java.lang.Object object)
throws OffGridException
- Replace the Object at address with object.
- Specified by:
put
in interface MutableGrid
- Overrides:
put
in class AbstractArrayGrid2D
- Returns:
- the Object that was at Address.
OffGridException
take
public java.lang.Object take(Address address)
throws OffGridException
- Replace the Object at Address with fill.
- Specified by:
take
in interface MutableGrid
- Overrides:
take
in class AbstractArrayGrid2D
- Returns:
- the Object that was at Address.
OffGridException
take
public java.lang.Object take(int i,
int j)
throws OffGridException
- Replaces the object at i,j with fill.
- Specified by:
take
in interface MutableGrid2D
- Overrides:
take
in class AbstractArrayGrid2D
- Returns:
- the object that was at i,j.
OffGridException
put
public java.lang.Object put(int i,
int j,
java.lang.Object object)
- Replaces the object at i,j with object.
- Specified by:
put
in interface MutableGrid2D
- Overrides:
put
in class AbstractArrayGrid2D
- Returns:
- the object that was at i,j.
Copyright (c) 2001, 2002, David Walend