Class RangeFacet

java.lang.Object
com.loop54.model.response.Facet
com.loop54.model.response.RangeFacet

public class RangeFacet extends Facet
This class provides results for a range facet. A facet that has a min and max value and only entities in between them are returned.
  • Field Details

    • min

      public Object min
    • max

      public Object max
    • selectedMin

      public Object selectedMin
    • selectedMax

      public Object selectedMax
  • Constructor Details

    • RangeFacet

      public RangeFacet()
  • Method Details

    • getType

      public FacetType getType()
      The type of the facet (as set in the request).
      Specified by:
      getType in class Facet
      Returns:
      Type of the facet.
    • hasValues

      public boolean hasValues()
      Whether or not the facet has any options.
      Specified by:
      hasValues in class Facet
      Returns:
      Whether or not the facet have any options.
    • getMin

      public <T> T getMin(Class<T> clazz)
      Gets the minimum value of the facet.
      Type Parameters:
      T - The type of the expected facet value.
      Parameters:
      clazz - Type of the values in the facet. Must match the type of the attribute faceted on.
      Returns:
      Minimum value of the facet.
    • getMax

      public <T> T getMax(Class<T> clazz)
      Gets the maximum value of the facet.
      Type Parameters:
      T - The type of the expected facet value.
      Parameters:
      clazz - Type of the values in the facet. Must match the type of the attribute faceted on.
      Returns:
      Maximum value of the facet.
    • getSelectedMin

      public <T> T getSelectedMin(Class<T> clazz)
      Gets the minimum selected value of the facet, as provided in the request.
      Type Parameters:
      T - The type of the expected facet value.
      Parameters:
      clazz - Type of the values in the facet. Must match the type of the attribute faceted on.
      Returns:
      Minimum selected value of the facet.
    • getSelectedMax

      public <T> T getSelectedMax(Class<T> clazz)
      Gets the minimum selected value of the facet, as provided in the request.
      Type Parameters:
      T - The type of the expected facet value.
      Parameters:
      clazz - Type of the values in the facet. Must match the type of the attribute faceted on.
      Returns:
      Minimum selected value of the facet.