Package net.sf.eBusx.time
Enum EInterval.TimeLocation
- java.lang.Object
-
- java.lang.Enum<EInterval.TimeLocation>
-
- net.sf.eBusx.time.EInterval.TimeLocation
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<EInterval.TimeLocation>
- Enclosing class:
- EInterval
public static enum EInterval.TimeLocation extends java.lang.Enum<EInterval.TimeLocation>
Denotes if a timestamp denotes the past, current time, future, or future on-going.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isFuture()
Returnstrue
if time is located in future.boolean
isPast()
Returnstrue
if time is located in past.static EInterval.TimeLocation
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static EInterval.TimeLocation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PAST
public static final EInterval.TimeLocation PAST
Feed begin or end time is in the past.
-
NOW
public static final EInterval.TimeLocation NOW
Feed begin or end time is the current time. Current time is neither in the past nor the future.
-
FUTURE
public static final EInterval.TimeLocation FUTURE
Feed end time is in the future. Feed begin time may not be in the future.
-
ON_GOING
public static final EInterval.TimeLocation ON_GOING
Feed end time continues into future indefinitely until stopped.
-
-
Method Detail
-
values
public static EInterval.TimeLocation[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (EInterval.TimeLocation c : EInterval.TimeLocation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EInterval.TimeLocation valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
isPast
public boolean isPast()
Returnstrue
if time is located in past. Note thatNOW
is neither in the past or the future.- Returns:
true
if time is located in past.
-
isFuture
public boolean isFuture()
Returnstrue
if time is located in future. Note thatNOW
is neither in the past or the future.- Returns:
true
if time is located in future.
-
-