Class FacetBucket

    • Field Detail

      • value

        protected java.lang.Object value
      • count

        protected long count
    • Constructor Detail

      • FacetBucket

        public FacetBucket()
      • FacetBucket

        public FacetBucket​(java.lang.String value,
                           long count)
      • FacetBucket

        public FacetBucket​(java.lang.Number value,
                           long count)
      • FacetBucket

        public FacetBucket​(java.util.Date value,
                           long count)
      • FacetBucket

        public FacetBucket​(java.lang.Boolean value,
                           long count)
      • FacetBucket

        public FacetBucket​(Point value,
                           long count)
      • FacetBucket

        public FacetBucket​(FacetRange range,
                           long count)
      • FacetBucket

        public FacetBucket​(Query query,
                           long count)
    • Method Detail

      • getValue

        public java.lang.Object getValue()
        Get the value for this bucket.
      • getRange

        public FacetRange getRange()
        Get the range for this bucket, or null if this bucket does not represent a range.
      • stringValue

        public java.lang.String stringValue()
        Gets the value as a string.
      • intValue

        public int intValue()
        Gets the value as an int.
        Throws:
        java.lang.IllegalArgumentException - if this value cannot be represented as an int.
      • longValue

        public long longValue()
        Gets the value as a long.
        Throws:
        java.lang.IllegalArgumentException - if this value cannot be represented as a long.
      • doubleValue

        public double doubleValue()
        Gets the value as a double.
        Throws:
        java.lang.IllegalArgumentException - if this value cannot be represented as a double.
      • floatValue

        public float floatValue()
        Gets the value as a float.
        Throws:
        java.lang.IllegalArgumentException - if this value cannot be represented as a float.
      • dateValue

        public java.util.Date dateValue()
        Gets the value as a Date.
        Throws:
        java.lang.IllegalArgumentException - if this value cannot be represented as a Date.
      • booleanValue

        public boolean booleanValue()
        Gets the value as a boolean.
        Throws:
        java.lang.IllegalArgumentException - if this value cannot be represented as a boolean.
      • pointValue

        public Point pointValue()
        Gets the value as a Point.
        Throws:
        java.lang.IllegalArgumentException - if this value cannot be represented as a Point.
      • decimalValue

        public java.math.BigDecimal decimalValue()
        Gets the value as a BigDecimal.
        Throws:
        java.lang.IllegalArgumentException - if this value cannot be represented as a BigDecimal.
      • setValue

        public void setValue​(java.lang.String value)
        Set a String value.
      • setValue

        public void setValue​(java.lang.Number value)
        Set a numeric value.
      • setValue

        public void setValue​(long value)
      • setValue

        public void setValue​(double value)
      • setValue

        public void setValue​(java.util.Date value)
        Set a Date value.
      • setValue

        public void setValue​(java.lang.Boolean value)
        Set a Boolean value.
      • setValue

        public void setValue​(Point value)
        Set a Point value.
      • setValue

        public void setValue​(Query value)
        Set a Query value.
      • setValue

        public void setValue​(FacetRange value)
        Set the range for this bucket.
      • getSortValue

        @Deprecated
        public java.lang.Comparable<?> getSortValue()
        Deprecated.
        use getValue() instead.
      • getDisplayValue

        public java.lang.String getDisplayValue()
        Get a string value that is suitable as a display value for this bucket.
      • getCount

        public long getCount()
        Get the count for this bucket.
      • setCount

        public void setCount​(long count)
        Set the count for this bucket.
      • add

        public void add​(FacetBucket other)
        Add the count for other to this bucket.
      • getChildren

        public FacetBuckets getChildren()
        Get the child buckets.

        Returns null if no child buckets exist.

      • getQueryFilter

        public Query getQueryFilter​(java.lang.String field)
        Get the Query to use for drilling down on this bucket via field.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • clone

        public FacetBucket clone()
        Overrides:
        clone in class java.lang.Object
      • toString

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

        protected static java.lang.Object clone​(java.lang.Object value)
      • equals

        protected static boolean equals​(java.lang.Object a,
                                        java.lang.Object b)
      • getDisplayValue

        public static java.lang.String getDisplayValue​(java.lang.Object value,
                                                       java.lang.String defaultValue)
        Get a display value for value
      • getFilter

        protected Query getFilter()
        JSON SUPPORT FOLLOWS
      • getDate

        protected java.lang.Long getDate()
      • setDate

        protected void setDate​(long value)
      • getValue_json

        protected java.lang.Object getValue_json()
      • setValue_json

        protected void setValue_json​(java.lang.Object value)