com.tractrac.clientmodule.data.containers
Class TimestampContainer<T extends TimeObject>
java.lang.Object
com.tractrac.clientmodule.data.containers.TimestampContainer<T>
- All Implemented Interfaces:
- ITimeObjectContainer<T>, java.lang.Iterable<T>
public class TimestampContainer<T extends TimeObject>
- extends java.lang.Object
- implements ITimeObjectContainer<T>, java.lang.Iterable<T>
- Version:
- 2.0
- Author:
- TracTrac
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TimestampContainer
public TimestampContainer()
add
public boolean add(T pos)
- Description copied from interface:
ITimeObjectContainer
- Adds a new time object to the container
- Specified by:
add in interface ITimeObjectContainer<T extends TimeObject>
- Parameters:
pos - the time object to add
- Returns:
true if the state of the container changed, false otherwise
size
public int size()
- Specified by:
size in interface ITimeObjectContainer<T extends TimeObject>
isEmpty
public boolean isEmpty()
floor
public T floor(long time)
higher
public T higher(long time)
iterator
public java.util.Iterator<T> iterator()
- Specified by:
iterator in interface java.lang.Iterable<T extends TimeObject>
get
public T get(long time)
contains
public boolean contains(long time)