Class FacetImpl

  • All Implemented Interfaces:

    public class FacetImpl
    extends Object
    implements Facet
    FacetImpl is a simple implementation of the Facet interface, which basically holds a collection of Buckets.

    Note that this class resides in a public package (OSGi) for easy reuse of custom FacetExtractors.

    • Constructor Detail

      • FacetImpl

        public FacetImpl()
        Creates a facet without any buckets. Use addBucket(Bucket) to add buckets one by one.
      • FacetImpl

        public FacetImpl​(Collection<? extends Bucket> buckets)
        Creates a facet with a given list of buckets.
    • Method Detail

      • addBucket

        public void addBucket​(Bucket bucket)
        Adds a bucket to the list of buckets that will be returned in getBuckets().
      • getBuckets

        public List<Bucket> getBuckets()
        Description copied from interface: Facet
        Returns the buckets for this facet.
        Specified by:
        getBuckets in interface Facet
        the buckets for this facet.
      • getContainsHit

        public boolean getContainsHit()
        Specified by:
        getContainsHit in interface Facet
        true if any of the buckets contains a hit, false otherwise.