Class Facet

    • Method Detail

      • withAtom

        public static Facet withAtom​(String name,
                                     String value)
        Creates and returns an atom facet with the given name and value.
        Returns:
        an instance of Facet.
        Throws:
        IllegalArgumentException - if the facet name or value are invalid.
      • withNumber

        public static Facet withNumber​(String name,
                                       Double value)
        Creates and returns a number facet with the given name and value.
        Returns:
        an instance of Facet.
        Throws:
        IllegalArgumentException - if the facet name or value are invalid.
      • getName

        public String getName()
        Returns the name of the facet.
      • getAtom

        public String getAtom()
        Returns the atomic value of the facet. Returns null if the value is not atomic.
      • getNumber

        public Double getNumber()
        Returns the numeric value of the facet. Returns null if the value is not numeric.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object