Class RuleKey

  • All Implemented Interfaces:, java.lang.Comparable<RuleKey>

    public class RuleKey
    extends java.lang.Object
    implements, java.lang.Comparable<RuleKey>
    Key of a rule. Unique among all the rule repositories.
    See Also:
    Serialized Form
    • Constructor Summary

      Modifier Constructor Description
      protected RuleKey​(java.lang.String repositoryKey, java.lang.String ruleKey)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(RuleKey o)  
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      static RuleKey of​(java.lang.String repository, java.lang.String rule)
      Create a key.
      static RuleKey parse​(java.lang.String s)
      Create a key from a string representation (see toString().
      java.lang.String repository()
      Never null
      java.lang.String rule()
      Never null
      java.lang.String toString()
      Format is "repository:rule", for example "squid:AvoidCycle"
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail


        public static final java.lang.String EXTERNAL_RULE_REPO_PREFIX
        See Also:
        Constant Field Values
    • Constructor Detail

      • RuleKey

        protected RuleKey​(java.lang.String repositoryKey,
                          java.lang.String ruleKey)
    • Method Detail

      • of

        public static RuleKey of​(java.lang.String repository,
                                 java.lang.String rule)
        Create a key. Parameters are NOT null.
      • parse

        public static RuleKey parse​(java.lang.String s)
        Create a key from a string representation (see toString(). An IllegalArgumentException is raised if the format is not valid.
      • repository

        public java.lang.String repository()
        Never null
      • rule

        public java.lang.String rule()
        Never null
      • equals

        public boolean equals​(@Nullable
                              java.lang.Object o)
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Format is "repository:rule", for example "squid:AvoidCycle"
        toString in class java.lang.Object
      • compareTo

        public int compareTo​(RuleKey o)
        Specified by:
        compareTo in interface java.lang.Comparable<RuleKey>