- java.lang.Object
-
- java.lang.Enum<TimeoutHandler.TimerType>
-
- org.logicng.handlers.TimeoutHandler.TimerType
-
- All Implemented Interfaces:
Serializable,Comparable<TimeoutHandler.TimerType>
- Enclosing class:
- TimeoutHandler
public static enum TimeoutHandler.TimerType extends Enum<TimeoutHandler.TimerType>
A timeout type determines how a timeout is interpreted.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FIXED_ENDTimeout which is interpreted as fixed point in time (in milliseconds) at which the computation should be aborted.RESTARTING_TIMEOUTTimeout which is restarted on every call toHandler.started().SINGLE_TIMEOUTSimple timeout which is started whenHandler.started()is called.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TimeoutHandler.TimerTypevalueOf(String name)Returns the enum constant of this type with the specified name.static TimeoutHandler.TimerType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SINGLE_TIMEOUT
public static final TimeoutHandler.TimerType SINGLE_TIMEOUT
Simple timeout which is started whenHandler.started()is called.Multiple calls to
Handler.started()do not restart the timeout.
-
RESTARTING_TIMEOUT
public static final TimeoutHandler.TimerType RESTARTING_TIMEOUT
Timeout which is restarted on every call toHandler.started().
-
FIXED_END
public static final TimeoutHandler.TimerType FIXED_END
Timeout which is interpreted as fixed point in time (in milliseconds) at which the computation should be aborted.The method
Handler.started()must still be called, but does not have an effect on the timeout.
-
-
Method Detail
-
values
public static TimeoutHandler.TimerType[] 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 (TimeoutHandler.TimerType c : TimeoutHandler.TimerType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TimeoutHandler.TimerType valueOf(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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-