public class TimestampsSet extends Object
Timestamp to an IntervalsList.| Constructor and Description |
|---|
TimestampsSet()
Build an empty
TimestampsSet. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Timestamp t)
Add a
Timestamp to the set. |
int |
getSize()
Get the number of
Timestamp in the set. |
boolean |
isEmpty()
Check if the instance is empty.
|
void |
setTolerance(TimeDuration tolerance)
Set the
TimeDuration used to define the minimum duration of
generated TimeInterval. |
IntervalsList |
toIntervalsList()
Returns an
IntervalsList built from a set of Timestamp
using the following algorithm: if the TimeDuration between two
Timestamp is inferior to the defined tolerance, they are grouped
in the same TimeInterval. |
public TimestampsSet()
TimestampsSet.public boolean isEmpty()
public int getSize()
Timestamp in the set.public void setTolerance(TimeDuration tolerance)
TimeDuration used to define the minimum duration of
generated TimeInterval.tolerance - TimeDuration minimal durationpublic IntervalsList toIntervalsList()
IntervalsList built from a set of Timestamp
using the following algorithm: if the TimeDuration between two
Timestamp is inferior to the defined tolerance, they are grouped
in the same TimeInterval. A TimeInterval duration can not
be inferior to the defined tolerance. TODO: better algorithm ?Copyright © 2015. All rights reserved.