public final class ReverseSync extends Object implements Sync
Sync.Abstract
CRONTAB_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 Object
public DateTime getCurrentStamp()
getCurrentStamp
in interface Sync
public TimeInterval getDefaultLimits()
getDefaultLimits
in interface Sync
public DateTime getFirstStamp()
getFirstStamp
in interface Sync
public DateTime getLastStamp()
getLastStamp
in interface Sync
public TimeInterval getLimits()
public Optional<DateTime> getNextStamp()
getNextStamp
in interface Sync
public Optional<DateTime> getNextStamp(DateTime stamp)
getNextStamp
in interface Sync
stamp
- The reference time stamp.public Optional<DateTime> getNextStamp(int intervals)
getNextStamp
in interface Sync
intervals
- A number of intervals.public Optional<DateTime> getNextStamp(DateTime stamp, int intervals)
getNextStamp
in interface Sync
stamp
- The reference time stamp.intervals
- A number of intervals.public Optional<DateTime> getPreviousStamp()
getPreviousStamp
in interface Sync
public Optional<DateTime> getPreviousStamp(DateTime stamp)
getPreviousStamp
in interface Sync
stamp
- The reference time stamp.public Optional<DateTime> getPreviousStamp(int intervals)
getPreviousStamp
in interface Sync
intervals
- A number of intervals.public Optional<DateTime> getPreviousStamp(DateTime stamp, int intervals)
getPreviousStamp
in interface Sync
stamp
- The reference time stamp.intervals
- A number of intervals.public int hashCode()
hashCode
in class Object
public boolean isBounded()
public boolean isInSync()
public boolean isInSync(DateTime stamp)
public ListIterator<DateTime> iterator()
public ListIterator<DateTime> reverseIterator()
reverseIterator
in interface Sync
public ListIterator<DateTime> reverseIterator(DateTime stamp)
reverseIterator
in interface Sync
stamp
- The initial stamp.public void seed(DateTime stamp)
public void setLimits(TimeInterval limits)
public String toString()
toString
in class Object
Copyright © 2003-2019 Serge Brisson. All Rights Reserved.