|
|
|
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.torweg.pulse.util.time.DurationSplitter
public final class DurationSplitter
Utility class for splitting a Duration by a Period.
NOTE: The DurationSplitter will operate on a
Duration levelled with the given Period.
| Field Summary | |
|---|---|
static long |
MAX_SIZE
The maximum number of Durations for the
DurationSplitter: 1000000. |
| Constructor Summary | |
|---|---|
DurationSplitter(Duration duration, Period period)
Creates a new DurationSplitter with given levelledDuration
and the given resolution. |
|
| Method Summary | |
|---|---|
java.util.Set<Duration> |
getDurations()
Returns the durations. |
Duration |
getLevelledDuration()
Returns the "levelled" Duration. |
Duration |
getRawDuration()
Returns the "raw" Duration. |
Period |
getSplitPeriod()
Returns the split Period. |
int |
size()
Returns the size of the underlying split-result durations. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long MAX_SIZE
Durations for the
DurationSplitter: 1000000.
| Constructor Detail |
|---|
public DurationSplitter(Duration duration, Period period)
DurationSplitter with given levelledDuration
and the given resolution.
duration - the Durationperiod - the Period
java.lang.NullPointerException - if either the given Duration or the given
Period is null
TimeUtilityException - if the approximated split size as calculated by
Period.approximateSplitSize(levelledDuration)
will exceed DurationSplitter.MAX_SIZE| Method Detail |
|---|
public Duration getLevelledDuration()
Duration.
Durationpublic Duration getRawDuration()
Duration.
Durationpublic Period getSplitPeriod()
Period.
Periodpublic java.util.Set<Duration> getDurations()
Set<Duration>public int size()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||