Class SentinelTargetLabel

java.lang.Object
org.mcmonkey.sentinel.targeting.SentinelTargetLabel

public class SentinelTargetLabel extends Object
Helper for prefix labeled targets.
  • Field Details

    • prefix

      public String prefix
      The label prefix.
    • value

      public String value
      The target value.
    • isRegex

      public boolean isRegex
      Whether this label is regex based.
    • regexPrefixes

      public static HashSet<String> regexPrefixes
      Prefixes that need regex validation.
    • corePrefixes

      public static HashSet<String> corePrefixes
      All default prefixes (anything else handled by an integration object).
    • autoLowercasePrefixes

      public static HashSet<String> autoLowercasePrefixes
      Prefixes that expect lowercased values.
    • ignoreMe

      public static long ignoreMe
      Helper to ensure code won't be optimized away (Java isn't likely to do this anyway, but just in case).
  • Constructor Details

    • SentinelTargetLabel

      public SentinelTargetLabel(String label)
      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

      public Collection<String> getTargetsList(SentinelTargetList listSet)
      Gets the target collection from a list set for this label.
    • addable

      public String 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

      public SentinelTargetList getMulti(String splitter)
      Gets the TargetList created by this multi-target label.
    • addToList

      public boolean addToList(SentinelTargetList listSet)
      Adds this target label to a list set.
    • addToList

      public boolean addToList(SentinelTargetList listSet, boolean doRecache)
      Adds this target label to a list set.
    • removeFromList

      public boolean removeFromList(SentinelTargetList listSet)
      Removes this target label from a list set.