Class SimpleBucket

  • All Implemented Interfaces:
    Bucket
    Direct Known Subclasses:
    PredefinedBucket

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

      Constructors 
      Constructor Description
      SimpleBucket​(Predicate predicate, java.lang.String value)
      Creates a new bucket with the given value.
    • Constructor Detail

      • SimpleBucket

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

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