Package repast.simphony.space.continuous
Interface CoordinateAccessor<T,U>
- All Known Implementing Classes:
MultiOccupancyCoordinateAccessor,SingleOccupancyCoordinateAccessor
public interface CoordinateAccessor<T,U>
-
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.
-
Method Details
-
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.- Parameters:
obj- the object to put at the locationlocationStorage- the location map to put the object inlocation- the location in the map- Returns:
- true if the put was successful, otherwise false.
-
remove
Removes the specified object from the location in the map.- Parameters:
obj- the object to removelocationStorage- the location map to remove the object fromlocation- the location in the map
-
get
Gets the item at the specified location in the map.- Parameters:
locationStorage- the location map to put the object inlocation- the location in the map- Returns:
- the item at the specified location
-
getAll
Gets all the items at the specified location in the map.- Parameters:
locationStorage- the location map to retrieve fromlocation- the location in the map- Returns:
- an iterator over all the items at the specified location
-
getRandom
Gets a random item from those at the specified location in the map.- Parameters:
locationStorage- the location map to retrieve fromlocation- the location in the map- Returns:
- a random item at the specified location
-