Class SimpleBucket

java.lang.Object
com.day.cq.search.facets.buckets.SimpleBucket
All Implemented Interfaces:
Bucket
Direct Known Subclasses:
PredefinedBucket

public class SimpleBucket extends Object implements Bucket
SimpleBucket is a bucket representing a single value.
  • Constructor Details

    • SimpleBucket

      public SimpleBucket(Predicate predicate, String value)
      Creates a new bucket with the given value.
      Parameters:
      value - the value of this bucket.
  • Method Details

    • increment

      public void increment()
      Increments the count of this bucket.
    • getCount

      public long getCount()
      Specified by:
      getCount in interface Bucket
      Returns:
      the number of items in this bucket.
    • getValue

      public String getValue()
      Specified by:
      getValue in interface Bucket
      Returns:
      the value for this bucket.
    • getPredicate

      public Predicate getPredicate()
      Specified by:
      getPredicate in interface Bucket
      Returns:
      a predicate representing this bucket that can be used for a new search