@Immutable
public final class Crontab
extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Crontab.BadItemException
Bad item exception.
|
Modifier and Type | Method and Description |
---|---|
DateTime |
change(DateTime dateTime,
ZoneId zoneId,
boolean forward)
Changes to the next (or previous) time.
|
boolean |
equals(Object other) |
boolean[] |
getDays()
Gets the days.
|
boolean[] |
getDaysOfWeek()
Gets the days of week.
|
String |
getEntry()
Gets the entry.
|
boolean[] |
getHours()
Gets the hours.
|
boolean[] |
getMinutes()
Gets the minutes.
|
boolean[] |
getMonths()
Gets the months.
|
int |
hashCode() |
boolean |
isInSchedule(DateTime dateTime,
ZoneId zoneId)
Asks if the date-time is in schedule.
|
static Crontab |
parse(String entry)
Parses a crontab entry.
|
static Crontab |
readExternal(ObjectInput input)
Reads in an external representation of a crontab.
|
String |
toString() |
static void |
writeExternal(Crontab crontab,
ObjectOutput output)
Writes out an external representation of a crontab.
|
@Nonnull @CheckReturnValue public static Crontab parse(@Nonnull String entry) throws Crontab.BadItemException
entry
- The crontab entry.Crontab.BadItemException
- When there is a bad item in the entry.@Nonnull @CheckReturnValue public static Crontab readExternal(@Nonnull ObjectInput input) throws IOException
This is a helper method for
Externalizable
objects containing a
Crontab.
input
- The external representation.IOException
- When an I/O error occurs.public static void writeExternal(@Nonnull Crontab crontab, @Nonnull ObjectOutput output) throws IOException
This is a helper method for
Externalizable
objects containing a
crontab.
crontab
- The crontab.output
- The external representation.IOException
- When an I/O error occurs.public DateTime change(@Nonnull DateTime dateTime, @Nonnull ZoneId zoneId, boolean forward)
dateTime
- The current date-time.zoneId
- The zone id.forward
- True for next (otherwise previous).public boolean equals(Object other)
equals
in class Object
@Nonnull @CheckReturnValue public boolean[] getDays()
@Nonnull @CheckReturnValue public boolean[] getDaysOfWeek()
@Nonnull @CheckReturnValue public String getEntry()
@Nonnull @CheckReturnValue public boolean[] getHours()
@Nonnull @CheckReturnValue public boolean[] getMinutes()
@Nonnull @CheckReturnValue public boolean[] getMonths()
public int hashCode()
hashCode
in class Object
@CheckReturnValue public boolean isInSchedule(@Nonnull DateTime dateTime, @Nonnull ZoneId zoneId)
dateTime
- The current date-time.zoneId
- The zone id.public String toString()
toString
in class Object
Copyright © 2003-2019 Serge Brisson. All Rights Reserved.