Package org.mcmonkey.sentinel.targeting
Class SentinelTargetLabel
java.lang.Object
org.mcmonkey.sentinel.targeting.SentinelTargetLabel
Helper for prefix labeled targets.
-
Field Summary
Modifier and TypeFieldDescriptionPrefixes that expect lowercased values.All default prefixes (anything else handled by an integration object).static long
Helper to ensure code won't be optimized away (Java isn't likely to do this anyway, but just in case).boolean
Whether this label is regex based.The label prefix.Prefixes that need regex validation.The target value. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddable()
Gets the addable string for this label.boolean
addToList
(SentinelTargetList listSet) Adds this target label to a list set.boolean
addToList
(SentinelTargetList listSet, boolean doRecache) Adds this target label to a list set.Gets the TargetList created by this multi-target label.getTargetsList
(SentinelTargetList listSet) Gets the target collection from a list set for this label.boolean
Returns whether the label is a valid multi-target.boolean
Returns whether the prefix is valid - if 'false', the prefix doesn't exist.boolean
Returns whether the RegEx is valid (or the target is not a RegEx target).boolean
Returns whether the target is valid.boolean
removeFromList
(SentinelTargetList listSet) Removes this target label from a list set.
-
Field Details
-
prefix
The label prefix. -
value
The target value. -
isRegex
public boolean isRegexWhether this label is regex based. -
regexPrefixes
Prefixes that need regex validation. -
corePrefixes
All default prefixes (anything else handled by an integration object). -
autoLowercasePrefixes
Prefixes that expect lowercased values. -
ignoreMe
public static long ignoreMeHelper to ensure code won't be optimized away (Java isn't likely to do this anyway, but just in case).
-
-
Constructor Details
-
SentinelTargetLabel
Constructs the target label instance.
-
-
Method Details
-
isValidRegex
public boolean isValidRegex()Returns whether the RegEx is valid (or the target is not a RegEx target). -
isValidTarget
public boolean isValidTarget()Returns whether the target is valid. True for all prefixed targets. -
isValidPrefix
public boolean isValidPrefix()Returns whether the prefix is valid - if 'false', the prefix doesn't exist. True for all non-prefixed targets. -
getTargetsList
Gets the target collection from a list set for this label. -
addable
Gets the addable string for this label. -
isValidMulti
public boolean isValidMulti()Returns whether the label is a valid multi-target. True for all non-multi targets. -
getMulti
Gets the TargetList created by this multi-target label. -
addToList
Adds this target label to a list set. -
addToList
Adds this target label to a list set. -
removeFromList
Removes this target label from a list set.
-