public class CompiledMap extends HashMap<Integer,CompiledPath>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
CompiledMap(long stepLen)
Creates an empty CompiledMap with the given stepLength.
|
CompiledMap(long stepLen,
long start,
long end)
Creates an empty CompiledMap with the given stepLength, and time range.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone() |
long |
getEndTime()
Returns the time of the last position contained in the CompiledMap.
|
long |
getStartTime()
Returns animation start offset time in milliseconds.
|
CompiledPath |
put(Integer key,
CompiledPath value)
Same as HashMap.put() but does not allow null keys or values, and checks
the stepLength of the given path.
|
void |
putAll(Map<? extends Integer,? extends CompiledPath> m)
Same as HashMap.put() but does not allow null keys or values, and checks
the stepLength of the given path.
|
void |
setTimes(long start,
long end,
boolean normalizeTimes)
Adjusts all CompiledPaths to use the given times.
|
clear, containsKey, containsValue, entrySet, get, isEmpty, keySet, remove, size, valuesequals, hashCode, toStringpublic CompiledMap(long stepLen)
stepLen - milliseconds between positionspublic CompiledMap(long stepLen,
long start,
long end)
stepLen - milliseconds between positionsstart - start timeend - end timepublic long getStartTime()
public long getEndTime()
public CompiledPath put(Integer key, CompiledPath value) throws IllegalArgumentException
put in interface Map<Integer,CompiledPath>put in class HashMap<Integer,CompiledPath>key - logical servo idvalue - CompiledPath for the given servoIllegalArgumentException - if key or value is null or if the
stepLengths do not matchpublic void putAll(Map<? extends Integer,? extends CompiledPath> m) throws IllegalArgumentException
putAll in interface Map<Integer,CompiledPath>putAll in class HashMap<Integer,CompiledPath>m - map containing servo id and CompiledPath pairsIllegalArgumentException - if null key or value is given or if the
stepLengths do not matchpublic void setTimes(long start,
long end,
boolean normalizeTimes)
start - new start timeend - new end timenormalizeTimes - if true, the start and end times are set to
multiples of the stepLength. If not normalized, some value < stepLength
can be added or removedpublic Object clone()
clone in class HashMap<Integer,CompiledPath>Copyright © 2011-2016. All Rights Reserved.