Facet (Google App Engine API for Java)

com.google.appengine.api.search

Class Facet

  • java.lang.Object
    • com.google.appengine.api.search.Facet
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean equals(java.lang.Object object) 
      java.lang.String getAtom()
      Returns the atomic value of the facet.
      java.lang.String getName()
      Returns the name of the facet.
      java.lang.Double getNumber()
      Returns the numeric value of the facet.
      int hashCode() 
      java.lang.String toString() 
      static Facet withAtom(java.lang.String name, java.lang.String value)
      Creates and returns an atom facet with the given name and value.
      static Facet withNumber(java.lang.String name, java.lang.Double value)
      Creates and returns a number facet with the given name and value.
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • withAtom

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

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

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

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

        public java.lang.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 java.lang.Object
      • equals

        public boolean equals(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • toString

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