public interface GroupResult<K, T>
extends Queryable
Represents a group result from a groupby...into clause.
Extends Queryable to provide aggregate and query methods
on the group's elements, with a key property for accessing
the group key.
K - the type of the group keyT - the type of the grouped elements| Type Params | Return Type | Name and description |
|---|---|---|
|
public Object |
get(String name)Returns a named component of the group key. |
|
public Object |
getAt(String name)Subscript operator for accessing named key components. |
|
public K |
getKey()Returns the group key. |
<K, T> |
public static GroupResult<K, T> |
of(K key, Queryable<T> group)Factory method to create a GroupResult instance. |
| Methods inherited from class | Name |
|---|---|
interface Queryable |
agg, avg, count, count, crossJoin, distinct, emptyQueryable, exists, from, from, from, from, fullHashJoin, fullJoin, groupBy, groupBy, groupByInto, groupByInto, innerHashJoin, innerJoin, intersect, leftHashJoin, leftJoin, limit, limit, list, max, median, min, minus, orderBy, orderBy, over, rightHashJoin, rightJoin, select, size, stdev, stdevp, stream, sum, toList, union, unionAll, var, varp, where |
Returns a named component of the group key.
Enables g.name property-style access and g.get("name") calls.
For multi-key groupby, looks up the named component in the key record.
name - the key component name (from as alias in groupby) Subscript operator for accessing named key components.
Enables g["name"] syntax.
name - the key component nameReturns the group key. For single-key groupby, this is the raw key value. For multi-key groupby, this is a NamedRecord with named access.
Factory method to create a GroupResult instance.
key - the group keygroup - the grouped elements as a QueryableK - the type of the group keyT - the type of the grouped elements