public enum CancellationPolicy extends java.lang.Enum<CancellationPolicy>
CancellationPolicy.Timed
The comparison will time out after the supplied interval.CancellationPolicy.Interruptible
The comparison will be cancelled when the Thread
that is running it is interrupted.CancellationPolicy.Cancel
The comparison will be cancelled when the Comparator cancel method is called.CancellationPolicy.Noop
The comparison cannot be cancelled. This is the default.Enum Constant and Description |
---|
Cancel
The comparison will be cancelled when the Comparator cancel method is called.
|
Interruptible
The comparison will be cancelled when the
Thread that is running it is interrupted. |
Noop
The comparison cannot be cancelled.
|
Timed
The comparison will time out after the supplied interval.
|
Modifier and Type | Method and Description |
---|---|
static CancellationPolicy |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static CancellationPolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CancellationPolicy Timed
public static final CancellationPolicy Interruptible
Thread
that is running it is interrupted.public static final CancellationPolicy Cancel
public static final CancellationPolicy Noop
public static CancellationPolicy[] values()
for (CancellationPolicy c : CancellationPolicy.values()) System.out.println(c);
public static CancellationPolicy valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null