public final class ReverseSync extends Object implements Sync
Sync.AbstractCRONTAB_PARAM, ELAPSED_PARAM, OFFSET_PARAM, STAMP_PARAM, TIME_ZONE_PARAM| Constructor and Description |
|---|
ReverseSync(Sync sync)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
ReverseSync |
copy()
Creates a copy of this.
|
boolean |
equals(Object other) |
DateTime |
getCurrentStamp()
Gets the current stamp.
|
TimeInterval |
getDefaultLimits()
Gets the default limits.
|
DateTime |
getFirstStamp()
Gets the first stamp.
|
DateTime |
getLastStamp()
Gets the last stamp.
|
TimeInterval |
getLimits()
Gets the limits.
|
Optional<DateTime> |
getNextStamp()
Gets the next time stamp.
|
Optional<DateTime> |
getNextStamp(DateTime stamp)
Gets the next time stamp.
|
Optional<DateTime> |
getNextStamp(DateTime stamp,
int intervals)
Gets the next time stamp separated by a number of intervals.
|
Optional<DateTime> |
getNextStamp(int intervals)
Gets the next time stamp separated by a number of intervals.
|
Optional<DateTime> |
getPreviousStamp()
Gets the previous time stamp.
|
Optional<DateTime> |
getPreviousStamp(DateTime stamp)
Gets the previous time stamp.
|
Optional<DateTime> |
getPreviousStamp(DateTime stamp,
int intervals)
Gets the previous time stamp separated by a number of intervals.
|
Optional<DateTime> |
getPreviousStamp(int intervals)
Gets the previous time stamp separated by a number of intervals.
|
int |
hashCode() |
boolean |
isBounded()
Returns true if the limits are inside BoT to EoT.
|
boolean |
isInSync()
Asks if the current time stamp is in sync.
|
boolean |
isInSync(DateTime stamp)
Asks if the reference time stamp is in sync.
|
ListIterator<DateTime> |
iterator()
Returns an iterator.
|
ListIterator<DateTime> |
iterator(DateTime stamp)
Returns an iterator.
|
ListIterator<DateTime> |
reverseIterator()
Returns a reverse iterator.
|
ListIterator<DateTime> |
reverseIterator(DateTime stamp)
Returns a reverse iterator.
|
void |
seed(DateTime stamp)
Seeds the time stamp.
|
void |
setLimits(TimeInterval limits)
Sets the limits.
|
String |
toString() |
public ReverseSync(@Nonnull
Sync sync)
sync - The actual sync.public ReverseSync copy()
public boolean equals(Object other)
equals in class Objectpublic DateTime getCurrentStamp()
getCurrentStamp in interface Syncpublic TimeInterval getDefaultLimits()
getDefaultLimits in interface Syncpublic DateTime getFirstStamp()
getFirstStamp in interface Syncpublic DateTime getLastStamp()
getLastStamp in interface Syncpublic TimeInterval getLimits()
public Optional<DateTime> getNextStamp()
getNextStamp in interface Syncpublic Optional<DateTime> getNextStamp(DateTime stamp)
getNextStamp in interface Syncstamp - The reference time stamp.public Optional<DateTime> getNextStamp(int intervals)
getNextStamp in interface Syncintervals - A number of intervals.public Optional<DateTime> getNextStamp(DateTime stamp, int intervals)
getNextStamp in interface Syncstamp - The reference time stamp.intervals - A number of intervals.public Optional<DateTime> getPreviousStamp()
getPreviousStamp in interface Syncpublic Optional<DateTime> getPreviousStamp(DateTime stamp)
getPreviousStamp in interface Syncstamp - The reference time stamp.public Optional<DateTime> getPreviousStamp(int intervals)
getPreviousStamp in interface Syncintervals - A number of intervals.public Optional<DateTime> getPreviousStamp(DateTime stamp, int intervals)
getPreviousStamp in interface Syncstamp - The reference time stamp.intervals - A number of intervals.public int hashCode()
hashCode in class Objectpublic boolean isBounded()
public boolean isInSync()
public boolean isInSync(DateTime stamp)
public ListIterator<DateTime> iterator()
public ListIterator<DateTime> reverseIterator()
reverseIterator in interface Syncpublic ListIterator<DateTime> reverseIterator(DateTime stamp)
reverseIterator in interface Syncstamp - The initial stamp.public void seed(DateTime stamp)
public void setLimits(TimeInterval limits)
public String toString()
toString in class ObjectCopyright © 2003-2019 Serge Brisson. All Rights Reserved.