Package repast.simphony.space.continuous
Class SingleOccupancyCoordinateAccessor<T>
java.lang.Object
repast.simphony.space.continuous.SingleOccupancyCoordinateAccessor<T>
- All Implemented Interfaces:
CoordinateAccessor<T,Map<NdPoint, Object>>
public class SingleOccupancyCoordinateAccessor<T>
extends Object
implements CoordinateAccessor<T,Map<NdPoint,Object>>
Coordinate accessor for a space where each location holds a single object.
- Author:
- Nick Collier
-
Constructor Summary
Constructors -
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.booleanAttempts to put the specified object at the specified location.voidRemoves the specified object from the location in the map.
-
Constructor Details
-
SingleOccupancyCoordinateAccessor
public SingleOccupancyCoordinateAccessor()
-
-
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.
-