public enum TrustLevel extends Enum<TrustLevel>
Different Levels of trust, used by the action checks to see if a given Member may perform a specific function.
Modifier and Type | Method and Description |
---|---|
static Set<TrustLevel> |
getLevels(TrustLevel level)
Returns the explicit list of TrustLevels, which is permitted or contained
by the given TrustLevel.
|
static boolean |
isAllowed(TrustLevel level,
TrustLevel expected)
Checks the given Trust Level against an expected, to verify if the given
level may perform an action.
|
static TrustLevel |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TrustLevel[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TrustLevel ALL
public static final TrustLevel READ
public static final TrustLevel WRITE
public static final TrustLevel ADMIN
public static final TrustLevel SYSOP
public static TrustLevel[] values()
for (TrustLevel c : TrustLevel.values()) System.out.println(c);
public static TrustLevel 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 static boolean isAllowed(TrustLevel level, TrustLevel expected)
level
- The Trust Level to check against the expectedexpected
- The expected Trust Levelpublic static Set<TrustLevel> getLevels(TrustLevel level)
level
- The TrustLevel to fetch the set of permitted TrustLevel's forCopyright © 2019 JavaDog.io. All rights reserved.