FacetResultValue (Google App Engine API for Java)

com.google.appengine.api.search

Class FacetResultValue

  • java.lang.Object
    • com.google.appengine.api.search.FacetResultValue
  • All Implemented Interfaces:
    java.io.Serializable


    public final class FacetResultValue
    extends java.lang.Object
    implements java.io.Serializable
    Represents a single facet result value. The value has a label, a count, and a refinementToken.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      static FacetResultValue create(java.lang.String label, int count, java.lang.String refinementToken)
      Creates and returns a facet result value.
      int getCount()
      Returns the count of the result value, which is an integer representing how many times this value is repeated in the result for the given facet value or range.
      java.lang.String getLabel()
      Returns the label of this facet result value.
      java.lang.String getRefinementToken()
      Returns the refinement token for this result value.
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

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

      • create

        public static FacetResultValue create(java.lang.String label,
                                              int count,
                                              java.lang.String refinementToken)
        Creates and returns a facet result value.
        Parameters:
        label - The label of the result returned by the backend that is the name of facet for atom facets and the string "[start,end)" for number facets.
        count - an integer representing how many times this value is repeated in the result.
        refinementToken - the token string for further refinement of the search result. To combine values for a single facet, add each of them separately to FacetRequest. There will be a disjunction between refinements for the same facet.
        Returns:
        an instance of FacetResultValue.
        Throws:
        java.lang.IllegalArgumentException - if label or refinementToken are empty.
      • getLabel

        public java.lang.String getLabel()
        Returns the label of this facet result value. The value label returned by the backend can be a single facet value name, or a range label in "[start,end)" format.
        Returns:
        label as string
      • getRefinementToken

        public java.lang.String getRefinementToken()
        Returns the refinement token for this result value. This token can be used to filter the result of new searches using this facet value.
        Returns:
        the refinement token string.
      • getCount

        public int getCount()
        Returns the count of the result value, which is an integer representing how many times this value is repeated in the result for the given facet value or range.
        Returns:
        the count of this label in facet result.
      • toString

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

Send feedback about...

App Engine standard environment for Java