public static enum Authorisation.Decision extends Enum<Authorisation.Decision>
Modifier and Type | Method and Description |
---|---|
boolean |
toBoolean()
Helper to turn GRANTED into true and anything else into false
|
static Authorisation.Decision |
toDecision(boolean answer)
Helper to turn boolean answers into GRANTED or DENIED
|
static Authorisation.Decision |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Authorisation.Decision[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Authorisation.Decision GRANTED
public static final Authorisation.Decision DENIED
public static final Authorisation.Decision ABSTAIN
public static Authorisation.Decision[] values()
for (Authorisation.Decision c : Authorisation.Decision.values()) System.out.println(c);
public static Authorisation.Decision valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean toBoolean()
This is turning tri-state logic into binary logic. Use deliberately.
public static Authorisation.Decision toDecision(boolean answer)
answer
- the boolean answerCopyright © 2002-2024 Atlassian. All Rights Reserved.