public static class GroupByVisitor.GroupByResult extends Object implements CalcResult
NULL_RESULT
Constructor and Description |
---|
GroupByResult(Map<List<Object>,CalcResult> results,
Aggregate aggregateVisitor,
List<Expression> groupByAttributes) |
Modifier and Type | Method and Description |
---|---|
Aggregate |
getAggregateVisitor() |
List<Expression> |
getGroupByAttributes() |
Map<List<Object>,CalcResult> |
getResults() |
Object |
getValue()
Actual answer
|
boolean |
isCompatible(CalcResult newResult)
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 newResult)
Returns the merged results of two CalcResult.
|
Object[] |
toArray()
Access getValue as an array
|
double |
toDouble()
Access getValue as a double
|
Envelope |
toEnvelope()
Access getValue as an envelope
|
float |
toFloat()
Access getValue as a float
|
Geometry |
toGeometry()
Access getValue as a geometry
|
int |
toInt()
Access getValue as an int
|
List |
toList()
Access getValue as a list
|
long |
toLong()
Access getValue as a long
|
Map |
toMap()
The keys of the map will be List instead of arrays, since arrays don't give a decent hash
code.
|
Point |
toPoint()
Access getValue as a point
|
Set |
toSet()
Access getValue as a set
|
String |
toString()
Access getValue as a string
|
public GroupByResult(Map<List<Object>,CalcResult> results, Aggregate aggregateVisitor, List<Expression> groupByAttributes)
public Map<List<Object>,CalcResult> getResults()
public Aggregate getAggregateVisitor()
public List<Expression> getGroupByAttributes()
public boolean isCompatible(CalcResult newResult)
CalcResult
isCompatible
in interface CalcResult
newResult
- the second CalcResult Objectpublic CalcResult merge(CalcResult newResult)
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
public Object getValue()
CalcResult
getValue
in interface CalcResult
public int toInt()
CalcResult
toInt
in interface CalcResult
public double toDouble()
CalcResult
toDouble
in interface CalcResult
public String toString()
CalcResult
toString
in interface CalcResult
toString
in class Object
public long toLong()
CalcResult
toLong
in interface CalcResult
public float toFloat()
CalcResult
toFloat
in interface CalcResult
public Geometry toGeometry()
CalcResult
toGeometry
in interface CalcResult
public Envelope toEnvelope()
CalcResult
toEnvelope
in interface CalcResult
public Point toPoint()
CalcResult
toPoint
in interface CalcResult
public Set toSet()
CalcResult
toSet
in interface CalcResult
public List toList()
CalcResult
toList
in interface CalcResult
public Object[] toArray()
CalcResult
toArray
in interface CalcResult
public Map toMap()
toMap
in interface CalcResult
Copyright © 1996–2019 Geotools. All rights reserved.