net.named_data.jndn.encrypt
public class RepetitiveInterval extends Object implements Comparable
Modifier and Type | Class and Description |
---|---|
static class |
RepetitiveInterval.RepeatUnit |
static class |
RepetitiveInterval.Result |
Constructor and Description |
---|
RepetitiveInterval()
Create a default RepetitiveInterval with one day duration, non-repeating.
|
RepetitiveInterval(double startDate,
double endDate,
int intervalStartHour,
int intervalEndHour)
Create a RepetitiveInterval with the given values, and no repetition.
|
RepetitiveInterval(double startDate,
double endDate,
int intervalStartHour,
int intervalEndHour,
int nRepeats,
RepetitiveInterval.RepeatUnit repeatUnit)
Create a RepetitiveInterval with the given values.
|
RepetitiveInterval(RepetitiveInterval repetitiveInterval)
Create a RepetitiveInterval, copying values from the given repetitiveInterval.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(RepetitiveInterval other)
Compare this to the other RepetitiveInterval.
|
int |
compareTo(Object other) |
int |
CompareTo(Object other) |
boolean |
equals(Object other) |
double |
getEndDate()
Get the end date.
|
RepetitiveInterval.Result |
getInterval(double timePoint)
Get an interval that covers the time point.
|
int |
getIntervalEndHour()
Get the interval end hour.
|
int |
getIntervalStartHour()
Get the interval start hour.
|
int |
getNRepeats()
Get the number of repeats.
|
RepetitiveInterval.RepeatUnit |
getRepeatUnit()
Get the repeat unit.
|
double |
getStartDate()
Get the start date.
|
int |
hashCode() |
static double |
toDateOnlyMilliseconds(double timePoint)
Return a time point on the beginning of the date (without hours, minutes, etc.)
|
public RepetitiveInterval()
public RepetitiveInterval(double startDate, double endDate, int intervalStartHour, int intervalEndHour, int nRepeats, RepetitiveInterval.RepeatUnit repeatUnit)
startDate
- The start date as milliseconds since Jan 1, 1970 UTC.endDate
- The end date as milliseconds since Jan 1, 1970 UTC.intervalStartHour
- The start hour in the day, from 0 to 23.intervalEndHour
- The end hour in the day from 1 to 24.nRepeats
- Repeat the interval nRepeats repetitions, every unit, until
endDate.repeatUnit
- The unit of the repetition. If this is NONE, then
startDate must equal endDate.Error
- if the above conditions are not met.public RepetitiveInterval(double startDate, double endDate, int intervalStartHour, int intervalEndHour)
startDate
- The start date as milliseconds since Jan 1, 1970 UTC.endDate
- The end date as milliseconds since Jan 1, 1970 UTC.intervalStartHour
- The start hour in the day, from 0 to 23.intervalEndHour
- The end hour in the day from 1 to 24.Error
- if the above conditions are not met.public RepetitiveInterval(RepetitiveInterval repetitiveInterval)
repetitiveInterval
- The RepetitiveInterval to copy values from.public final RepetitiveInterval.Result getInterval(double timePoint)
timePoint
- The time point as milliseconds since Jan 1, 1970 UTC.public final int compare(RepetitiveInterval other)
other
- The other RepetitiveInterval to compare to.public int compareTo(Object other)
compareTo
in interface Comparable
public int CompareTo(Object other)
public final double getStartDate()
public final double getEndDate()
public final int getIntervalStartHour()
public final int getIntervalEndHour()
public final int getNRepeats()
public final RepetitiveInterval.RepeatUnit getRepeatUnit()
public static double toDateOnlyMilliseconds(double timePoint)
timePoint
- The time point as milliseconds since Jan 1, 1970 UTC.Copyright © 2016. All rights reserved.