|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Map
Provides a general interface for maps.
Method Summary | |
---|---|
java.lang.Double |
getDistance(java.lang.String fromLocation,
java.lang.String toLocation)
Returns the travel distance between the two specified locations if they are linked by a connection and null otherwise. |
java.util.List<java.lang.String> |
getLocations()
Returns a list of all locations. |
java.util.List<java.lang.String> |
getLocationsLinkedTo(java.lang.String fromLocation)
Answers to the question: Where can I get, following one of the connections starting at the specified location? |
Point2D |
getPosition(java.lang.String loc)
Returns an array with two integers describing the the position of the specified location. |
java.lang.String |
randomlyGenerateDestination()
Returns a location which is selected by random. |
Method Detail |
---|
java.util.List<java.lang.String> getLocations()
java.util.List<java.lang.String> getLocationsLinkedTo(java.lang.String fromLocation)
java.lang.Double getDistance(java.lang.String fromLocation, java.lang.String toLocation)
Point2D getPosition(java.lang.String loc)
java.lang.String randomlyGenerateDestination()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |