Class CoolerWeighting


  • public class CoolerWeighting
    extends java.lang.Object

    Ranking weighting, defined using -cool command line flags on the query processor.

    Each weighting is defined by a short name and an identifier

    This is used mostly when explain mode is enabled, for the Content Optimiser.

    Since:
    v12.4
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int id
      Identifier
      private java.lang.String name
      Short name, e.g.
      private static java.lang.String SEP
      Separator between the id and the name
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      2 CoolerWeightings are considered equals if their name + id match.
      static CoolerWeighting fromJSON​(java.lang.String json)
      Used to deserialize a CoolerWeighting from a JSON value, as represented by toString().
      int getId()
      Identifier
      java.lang.String getName()
      Short name, e.g.
      int hashCode()
      Hash code based on the name + id properties.
      void setId​(int id)
      Identifier
      void setName​(java.lang.String name)
      Short name, e.g.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • SEP

        private static final java.lang.String SEP
        Separator between the id and the name
        See Also:
        Constant Field Values
      • name

        private java.lang.String name
        Short name, e.g. offlink
      • id

        private int id
        Identifier
    • Constructor Detail

      • CoolerWeighting

        public CoolerWeighting()
      • CoolerWeighting

        public CoolerWeighting​(java.lang.String name,
                               int id)
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object obj)

        2 CoolerWeightings are considered equals if their name + id match.

        Two different instances with the same name and id will be considered equal.

        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()

        Hash code based on the name + id properties.

        Two different instances with the same name and id will have the same hash code.

        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getName

        public java.lang.String getName()
        Short name, e.g. offlink
      • setName

        public void setName​(java.lang.String name)
        Short name, e.g. offlink
      • getId

        public int getId()
        Identifier
      • setId

        public void setId​(int id)
        Identifier