public class InternalAggregations extends java.lang.Object implements Aggregations, ToXContent, Streamable
Aggregations
.ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
static InternalAggregations |
EMPTY |
EMPTY_PARAMS
Constructor and Description |
---|
InternalAggregations(java.util.List<InternalAggregation> aggregations)
Constructs a new addAggregation.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Aggregation> |
asList()
The list of
Aggregation s. |
java.util.Map<java.lang.String,Aggregation> |
asMap()
Returns the
Aggregation s keyed by map. |
<A extends Aggregation> |
get(java.lang.String name)
Returns the aggregation that is associated with the specified name.
|
java.util.Map<java.lang.String,Aggregation> |
getAsMap()
Returns the
Aggregation s keyed by map. |
java.lang.Object |
getProperty(java.util.List<java.lang.String> path) |
java.lang.Object |
getProperty(java.lang.String path)
Get the value of specified path in the aggregation.
|
java.util.Iterator<Aggregation> |
iterator()
Iterates over the
Aggregation s. |
static InternalAggregations |
readAggregations(StreamInput in) |
void |
readFrom(StreamInput in)
Set this object's fields from a StreamInput.
|
static InternalAggregations |
readOptionalAggregations(StreamInput in) |
static InternalAggregations |
reduce(java.util.List<InternalAggregations> aggregationsList,
InternalAggregation.ReduceContext context)
Reduces the given lists of addAggregation.
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
XContentBuilder |
toXContentInternal(XContentBuilder builder,
ToXContent.Params params)
Directly write all the addAggregation without their bounding object.
|
void |
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
|
public static final InternalAggregations EMPTY
public InternalAggregations(java.util.List<InternalAggregation> aggregations)
public java.util.Iterator<Aggregation> iterator()
Aggregation
s.iterator
in interface java.lang.Iterable<Aggregation>
public java.util.List<Aggregation> asList()
Aggregation
s.asList
in interface Aggregations
public java.util.Map<java.lang.String,Aggregation> asMap()
Aggregation
s keyed by map.asMap
in interface Aggregations
public java.util.Map<java.lang.String,Aggregation> getAsMap()
Aggregation
s keyed by map.getAsMap
in interface Aggregations
public <A extends Aggregation> A get(java.lang.String name)
Aggregations
get
in interface Aggregations
public java.lang.Object getProperty(java.lang.String path)
Aggregations
getProperty
in interface Aggregations
path
- the path to the property in the aggregation treepublic java.lang.Object getProperty(java.util.List<java.lang.String> path)
public static InternalAggregations reduce(java.util.List<InternalAggregations> aggregationsList, InternalAggregation.ReduceContext context)
aggregationsList
- A list of aggregation to reducepublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent
in interface ToXContent
java.io.IOException
public XContentBuilder toXContentInternal(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
java.io.IOException
public static InternalAggregations readAggregations(StreamInput in) throws java.io.IOException
java.io.IOException
public static InternalAggregations readOptionalAggregations(StreamInput in) throws java.io.IOException
java.io.IOException
public void readFrom(StreamInput in) throws java.io.IOException
Streamable
readFrom
in interface Streamable
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Streamable
writeTo
in interface Streamable
java.io.IOException