class StringStatsValues extends AbstractStatsValues<java.lang.String>
Constructor and Description |
---|
StringStatsValues(FieldType fieldType) |
Modifier and Type | Method and Description |
---|---|
protected void |
addTypeSpecificStats(NamedList<java.lang.Object> res)
Adds no type specific statistics
|
private static java.lang.String |
max(java.lang.String str1,
java.lang.String str2)
Determines which of the given Strings is the maximum, as computed by
String.compareTo(Object) |
private static java.lang.String |
min(java.lang.String str1,
java.lang.String str2)
Determines which of the given Strings is the minimum, as computed by
String.compareTo(Object) |
protected java.lang.String |
toTypedValue(java.lang.String value)
Converts the String value to a value associated with the specific StatsValues implementation
|
protected void |
updateMinMax(java.lang.String min,
java.lang.String max)
Updates the minimum and maximum statistics based on the given values
|
protected void |
updateTypeSpecificStats(NamedList stv)
Updates the type specific statistics based on the values in the given list
|
protected void |
updateTypeSpecificStats(java.lang.String value)
Updates the type specific statistics based on the given value
|
protected void |
updateTypeSpecificStats(java.lang.String value,
int count)
Updates the type specific statistics based on the given value
|
accumulate, accumulate, accumulate, addFacet, addMissing, getStatsValues, missing
public StringStatsValues(FieldType fieldType)
protected void updateTypeSpecificStats(NamedList stv)
updateTypeSpecificStats
in class AbstractStatsValues<java.lang.String>
stv
- List containing values the current statistics should be updated againstprotected void updateTypeSpecificStats(java.lang.String value)
updateTypeSpecificStats
in class AbstractStatsValues<java.lang.String>
value
- Value the statistics should be updated againstprotected void updateTypeSpecificStats(java.lang.String value, int count)
updateTypeSpecificStats
in class AbstractStatsValues<java.lang.String>
value
- Value the statistics should be updated againstcount
- Number of times the value is being accumulatedprotected void updateMinMax(java.lang.String min, java.lang.String max)
updateMinMax
in class AbstractStatsValues<java.lang.String>
min
- Value that the current minimum should be updated againstmax
- Value that the current maximum should be updated againstprotected java.lang.String toTypedValue(java.lang.String value)
toTypedValue
in class AbstractStatsValues<java.lang.String>
value
- String value to convertprotected void addTypeSpecificStats(NamedList<java.lang.Object> res)
addTypeSpecificStats
in class AbstractStatsValues<java.lang.String>
res
- NamedList to add the type specific statistics tooprivate static java.lang.String max(java.lang.String str1, java.lang.String str2)
String.compareTo(Object)
str1
- String to compare against bstr2
- String compared against aString.compareTo(Object)
, str2 otherwiseprivate static java.lang.String min(java.lang.String str1, java.lang.String str2)
String.compareTo(Object)
str1
- String to compare against bstr2
- String compared against aString.compareTo(Object)
, str2 otherwise