public class Contexts extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVER_KEY
The context key used to denote the subjects server
|
static String |
WORLD_KEY
The context key used to denote the subjects world
|
| Modifier | Constructor and Description |
|---|---|
|
Contexts(@NonNull ContextSet contextSet,
boolean includeNodesSetWithoutServer,
boolean includeNodesSetWithoutWorld,
boolean resolveInheritance,
boolean applyParentsWithoutServer,
boolean applyParentsWithoutWorld,
boolean isOp)
Deprecated.
|
protected |
Contexts(@NonNull ImmutableContextSet contextSet,
byte settingsFlag) |
| Modifier and Type | Method and Description |
|---|---|
static @NonNull Contexts |
allowAll()
Gets the
FullySatisfiedContexts instance. |
boolean |
equals(Object o) |
@NonNull ContextSet |
getContexts()
Gets the
set of context pairs for this Contexts instance. |
@NonNull Set<LookupSetting> |
getSettings()
Gets the set of
LookupSettings for this Contexts instance. |
static @NonNull Contexts |
global()
Returns a 'global' or default contexts instance.
|
int |
hashCode() |
boolean |
hasSetting(@NonNull LookupSetting setting)
Gets if the given
LookupSetting is set. |
boolean |
isApplyGlobalGroups()
Deprecated.
in favour of
hasSetting(LookupSetting) |
boolean |
isApplyGlobalWorldGroups()
Deprecated.
in favour of
hasSetting(LookupSetting) |
boolean |
isApplyGroups()
Deprecated.
in favour of
hasSetting(LookupSetting) |
boolean |
isIncludeGlobal()
Deprecated.
in favour of
hasSetting(LookupSetting) |
boolean |
isIncludeGlobalWorld()
Deprecated.
in favour of
hasSetting(LookupSetting) |
boolean |
isOp()
Deprecated.
in favour of
hasSetting(LookupSetting) |
static @NonNull Contexts |
of(@NonNull ContextSet contextSet,
boolean includeNodesSetWithoutServer,
boolean includeNodesSetWithoutWorld,
boolean resolveInheritance,
boolean applyParentsWithoutServer,
boolean applyParentsWithoutWorld,
boolean isOp)
Creates a new
Contexts instance. |
static Contexts |
of(@NonNull ContextSet contextSet,
@NonNull Set<LookupSetting> settings)
Creates a new
Contexts instance. |
@NonNull Contexts |
setContexts(@NonNull ContextSet contextSet)
Creates a copy of this
Contexts instance, but with the
set of context pairs replaced by the given set. |
@NonNull Contexts |
setSettings(@NonNull Set<LookupSetting> settings)
Creates a copy of this
Contexts instance, but with the
LookupSettings replaced by the given settings. |
@NonNull String |
toString() |
public static final String SERVER_KEY
public static final String WORLD_KEY
@Deprecated public Contexts(@NonNull ContextSet contextSet, boolean includeNodesSetWithoutServer, boolean includeNodesSetWithoutWorld, boolean resolveInheritance, boolean applyParentsWithoutServer, boolean applyParentsWithoutWorld, boolean isOp)
of(ContextSet, boolean, boolean, boolean, boolean, boolean, boolean)Contexts instance.contextSet - the context setincludeNodesSetWithoutServer - the value of LookupSetting.INCLUDE_NODES_SET_WITHOUT_SERVERincludeNodesSetWithoutWorld - the value of LookupSetting.INCLUDE_NODES_SET_WITHOUT_WORLDresolveInheritance - the value of LookupSetting.RESOLVE_INHERITANCEapplyParentsWithoutServer - the value of LookupSetting.APPLY_PARENTS_SET_WITHOUT_SERVERapplyParentsWithoutWorld - the value of LookupSetting.APPLY_PARENTS_SET_WITHOUT_WORLDisOp - the value of LookupSetting.IS_OPprotected Contexts(@NonNull ImmutableContextSet contextSet, byte settingsFlag)
public static @NonNull Contexts allowAll()
FullySatisfiedContexts instance.public static @NonNull Contexts global()
Formed of an empty ContextSet and all inclusion and
inheritance LookupSettings applied.
public static @NonNull Contexts of(@NonNull ContextSet contextSet, boolean includeNodesSetWithoutServer, boolean includeNodesSetWithoutWorld, boolean resolveInheritance, boolean applyParentsWithoutServer, boolean applyParentsWithoutWorld, boolean isOp)
Contexts instance.contextSet - the context setincludeNodesSetWithoutServer - the value of LookupSetting.INCLUDE_NODES_SET_WITHOUT_SERVERincludeNodesSetWithoutWorld - the value of LookupSetting.INCLUDE_NODES_SET_WITHOUT_WORLDresolveInheritance - the value of LookupSetting.RESOLVE_INHERITANCEapplyParentsWithoutServer - the value of LookupSetting.APPLY_PARENTS_SET_WITHOUT_SERVERapplyParentsWithoutWorld - the value of LookupSetting.APPLY_PARENTS_SET_WITHOUT_WORLDisOp - the value of LookupSetting.IS_OPpublic static Contexts of(@NonNull ContextSet contextSet, @NonNull Set<LookupSetting> settings)
Contexts instance.contextSet - the context setsettings - the settingspublic @NonNull ContextSet getContexts()
set of context pairs for this Contexts instance.public @NonNull Set<LookupSetting> getSettings()
LookupSettings for this Contexts instance.public @NonNull Contexts setContexts(@NonNull ContextSet contextSet)
Contexts instance, but with the
set of context pairs replaced by the given set.contextSet - the context setpublic @NonNull Contexts setSettings(@NonNull Set<LookupSetting> settings)
Contexts instance, but with the
LookupSettings replaced by the given settings.settings - the lookup settingspublic boolean hasSetting(@NonNull LookupSetting setting)
LookupSetting is set.setting - the setting@Deprecated public boolean isOp()
hasSetting(LookupSetting)LookupSetting.IS_OP.LookupSetting.IS_OP@Deprecated public boolean isIncludeGlobal()
hasSetting(LookupSetting)LookupSetting.INCLUDE_NODES_SET_WITHOUT_SERVER.LookupSetting.INCLUDE_NODES_SET_WITHOUT_SERVER@Deprecated public boolean isIncludeGlobalWorld()
hasSetting(LookupSetting)LookupSetting.INCLUDE_NODES_SET_WITHOUT_WORLD.LookupSetting.INCLUDE_NODES_SET_WITHOUT_WORLD@Deprecated public boolean isApplyGroups()
hasSetting(LookupSetting)LookupSetting.RESOLVE_INHERITANCE.LookupSetting.RESOLVE_INHERITANCE@Deprecated public boolean isApplyGlobalGroups()
hasSetting(LookupSetting)LookupSetting.APPLY_PARENTS_SET_WITHOUT_SERVER.LookupSetting.APPLY_PARENTS_SET_WITHOUT_SERVER@Deprecated public boolean isApplyGlobalWorldGroups()
hasSetting(LookupSetting)LookupSetting.APPLY_PARENTS_SET_WITHOUT_WORLD.LookupSetting.APPLY_PARENTS_SET_WITHOUT_WORLD