public static class UniqueVisitor.UniqueResult extends AbstractCalcResult
NULL_RESULT
Constructor and Description |
---|
UniqueResult(Set newSet) |
UniqueResult(Set newSet,
boolean preserveOrder) |
Modifier and Type | Method and Description |
---|---|
static Set |
createNewSet(Collection collection,
boolean preserveOrder) |
Object |
getValue()
Actual answer
|
boolean |
isCompatible(CalcResult targetResults)
Returns true if the target results is a compatible type with the current results, with
compatible meaning that the two results may be merged.
|
CalcResult |
merge(CalcResult resultsToAdd)
Returns the merged results of two CalcResult.
|
toArray, toDouble, toEnvelope, toFloat, toGeometry, toInt, toList, toLong, toMap, toPoint, toSet, toString, toStringArray
public UniqueResult(Set newSet)
public UniqueResult(Set newSet, boolean preserveOrder)
public static Set createNewSet(Collection collection, boolean preserveOrder)
public Object getValue()
CalcResult
getValue
in interface CalcResult
getValue
in class AbstractCalcResult
public boolean isCompatible(CalcResult targetResults)
CalcResult
isCompatible
in interface CalcResult
isCompatible
in class AbstractCalcResult
targetResults
- the second CalcResult Objectpublic CalcResult merge(CalcResult resultsToAdd)
CalcResult
For example: merging two min functions would return the smaller of the two values; merging a count and a sum would return an average.
merge
in interface CalcResult
merge
in class AbstractCalcResult
Copyright © 1996–2019 Geotools. All rights reserved.