private abstract static class SimpleFacets.RangeEndpointCalculator<T extends java.lang.Comparable<T>>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected SchemaField |
field |
| Constructor and Description |
|---|
RangeEndpointCalculator(SchemaField field) |
| Modifier and Type | Method and Description |
|---|---|
T |
addGap(T value,
java.lang.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.
|
java.lang.String |
formatValue(T val)
Formats a Range endpoint for use as a range label name in the response.
|
java.lang.Object |
getGap(java.lang.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.
|
T |
getValue(java.lang.String rawval)
Parses a String param into an Range endpoint value throwing
a useful exception if not possible
|
protected abstract T |
parseAndAddGap(T value,
java.lang.String gap)
Adds the String gap param to a low Range endpoint value to determine
the corrisponding high Range endpoint value.
|
protected java.lang.Object |
parseGap(java.lang.String rawval)
Parses a String param into a value that represents the gap and
can be included in the response.
|
protected abstract T |
parseVal(java.lang.String rawval)
Parses a String param into an Range endpoint.
|
protected final SchemaField field
public RangeEndpointCalculator(SchemaField field)
public java.lang.String formatValue(T val)
public final T getValue(java.lang.String rawval)
protected abstract T parseVal(java.lang.String rawval) throws java.text.ParseException
java.text.ParseExceptionpublic final java.lang.Object getGap(java.lang.String gap)
protected java.lang.Object parseGap(java.lang.String rawval)
throws java.text.ParseException
java.text.ParseExceptionpublic final T addGap(T value, java.lang.String gap)
protected abstract T parseAndAddGap(T value, java.lang.String gap) throws java.text.ParseException
java.text.ParseException