Package com.helger.commons.state
Enum EInterrupt
- java.lang.Object
-
- java.lang.Enum<EInterrupt>
-
- com.helger.commons.state.EInterrupt
-
- All Implemented Interfaces:
IInterruptIndicator,Serializable,Comparable<EInterrupt>
public enum EInterrupt extends Enum<EInterrupt> implements IInterruptIndicator
Small enum for setter method to identify whether a value has changed or not.- Author:
- Philip Helger
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INTERRUPTEDNOT_INTERRUPTED
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisInterrupted()static EInterruptvalueOf(boolean bInterrupted)Returns the enum constant of this type with the specified name.static EInterruptvalueOf(IInterruptIndicator aInterruptIndicator)Returns the enum constant of this type with the specified name.static EInterruptvalueOf(String name)Returns the enum constant of this type with the specified name.static EInterrupt[]values()Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface com.helger.commons.state.IInterruptIndicator
and, isNotInterrupted, or
-
-
-
-
Enum Constant Detail
-
INTERRUPTED
public static final EInterrupt INTERRUPTED
-
NOT_INTERRUPTED
public static final EInterrupt NOT_INTERRUPTED
-
-
Method Detail
-
values
public static EInterrupt[] 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 (EInterrupt c : EInterrupt.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EInterrupt 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
-
isInterrupted
public boolean isInterrupted()
- Specified by:
isInterruptedin interfaceIInterruptIndicator- Returns:
trueif interrupted andfalseif not.
-
valueOf
@Nonnull public static EInterrupt valueOf(boolean bInterrupted)
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:
bInterrupted- 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
-
valueOf
@Nonnull public static EInterrupt valueOf(@Nonnull IInterruptIndicator aInterruptIndicator)
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:
aInterruptIndicator- 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
-
-