public class LocationHistory
extends java.lang.Object
ExtendedMode
s and Location
s, ordered by
the time when the location was recorded.Constructor and Description |
---|
LocationHistory() |
Modifier and Type | Method and Description |
---|---|
void |
add(ExtendedMode mode,
Location location)
Sets the
location that is to be used for mode . |
Location |
get(ExtendedMode mode)
Gets the location that is to be used for
mode . |
ExtendedMode |
getLastMode()
Gets the newest entry of this history.
|
java.util.Map<Path,Location> |
getLocations()
Gets all the locations that are stored in this history.
|
ExtendedMode |
getMode(int index)
Gets the
index 'th entry of this history, where an
index of 0 represents the oldest entry. |
java.util.List<Path> |
getOrder()
Gets all the identifiers of the ordered
ExtendedMode s. |
int |
getSize()
Gets the number of entries this history has.
|
void |
insert(int index,
ExtendedMode mode,
Location location)
Sets the
location that is to be used for mode . |
void |
remove(ExtendedMode mode)
Removes any entries related to
mode . |
public void add(ExtendedMode mode, Location location)
location
that is to be used for mode
.mode
- the mode of the locationlocation
- the location to storepublic void insert(int index, ExtendedMode mode, Location location)
location
that is to be used for mode
.index
- the location of the mode, where 0 represents the oldest entrymode
- the mode of the locationlocation
- the location to storepublic Location get(ExtendedMode mode)
mode
.mode
- the mode whose location is searchednull
if not foundpublic void remove(ExtendedMode mode)
mode
.mode
- the mode to removepublic int getSize()
public ExtendedMode getMode(int index)
index
'th entry of this history, where an
index of 0 represents the oldest entry.index
- the location of the entryindex
public ExtendedMode getLastMode()
null
public java.util.List<Path> getOrder()
ExtendedMode
s.