Package repast.simphony.space.continuous
Class MultiOccupancyCoordinateAccessor<T>
java.lang.Object
repast.simphony.space.continuous.MultiOccupancyCoordinateAccessor<T>
- All Implemented Interfaces:
CoordinateAccessor<T,
Map<NdPoint, Object>>
public class MultiOccupancyCoordinateAccessor<T>
extends Object
implements CoordinateAccessor<T,Map<NdPoint,Object>>
Coordinate accessor where a location can hold multiple individual objects. This uses a list to
store the objects in each cell.
- Author:
- Nick Collier
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the item at the specified location in the map.Gets all the items at the specified location in the map.Gets a random item from those at the specified location in the map.boolean
Attempts to put the specified object at the specified location.void
Removes the specified object from the location in the map.
-
Constructor Details
-
MultiOccupancyCoordinateAccessor
public MultiOccupancyCoordinateAccessor()
-
-
Method Details
-
get
Gets the item at the specified location in the map. -
getAll
Gets all the items at the specified location in the map. -
getRandom
public T getRandom(cern.jet.random.Uniform distribution, Map<NdPoint, Object> locationMap, NdPoint location) Gets a random item from those at the specified location in the map. -
put
Attempts to put the specified object at the specified location. Returns true if the put was successful. The semantics of the result will be determined by implementing classes. -
remove
Removes the specified object from the location in the map.
-