public abstract class FacetRangeGenerator<T extends Comparable<T>> extends Object
FacetRangeGenerator.FacetRanges for a given RangeFacet.| Modifier and Type | Class and Description | 
|---|---|
| static class  | FacetRangeGenerator.FacetRange | 
| Modifier and Type | Field and Description | 
|---|---|
| protected SchemaField | field | 
| protected RangeFacet | rangeFacet | 
| Constructor and Description | 
|---|
| FacetRangeGenerator(RangeFacet rangeFacet) | 
| Modifier and Type | Method and Description | 
|---|---|
| T | addGap(T value,
      String gap)Adds the String gap param to a low Range endpoint value to determine 
 the corrisponding high Range endpoint value, throwing 
 a useful exception if not possible. | 
| static FacetRangeGenerator<? extends Comparable<?>> | create(RangeFacet rangeFacet) | 
| String | formatValue(T val)Formats a Range endpoint for use as a range label name in the response. | 
| Object | getGap(String gap)Parses a String param into a value that represents the gap and 
 can be included in the response, throwing 
 a useful exception if not possible. | 
| List<FacetRangeGenerator.FacetRange> | getRanges() | 
| T | getValue(String rawval)Parses a String param into an Range endpoint value throwing 
 a useful exception if not possible | 
| protected abstract T | parseAndAddGap(T value,
              String gap)Adds the String gap param to a low Range endpoint value to determine 
 the corrisponding high Range endpoint value. | 
| protected Object | parseGap(String rawval)Parses a String param into a value that represents the gap and 
 can be included in the response. | 
| protected abstract T | parseVal(String rawval)Parses a String param into an Range endpoint. | 
protected final SchemaField field
protected final RangeFacet rangeFacet
public FacetRangeGenerator(RangeFacet rangeFacet)
public String formatValue(T val)
public final T getValue(String rawval)
protected abstract T parseVal(String rawval) throws ParseException
ParseExceptionpublic final Object getGap(String gap)
protected Object parseGap(String rawval) throws ParseException
ParseExceptionpublic final T addGap(T value, String gap)
protected abstract T parseAndAddGap(T value, String gap) throws ParseException
ParseExceptionpublic List<FacetRangeGenerator.FacetRange> getRanges()
public static FacetRangeGenerator<? extends Comparable<?>> create(RangeFacet rangeFacet)
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.