public class InternalFacets extends Object implements Facets, Streamable, ToXContent, Iterable<Facet>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
EMPTY_PARAMS
Constructor and Description |
---|
InternalFacets(List<Facet> facets)
Constructs a new facets.
|
Modifier and Type | Method and Description |
---|---|
<T extends Facet> |
facet(Class<T> facetType,
String name)
Returns the facet by name already casted to the specified type.
|
<T extends Facet> |
facet(String name)
A facet of the specified name.
|
List<Facet> |
facets()
The list of
Facet s. |
Map<String,Facet> |
facetsAsMap()
Returns the
Facet s keyed by map. |
Map<String,Facet> |
getFacets()
Returns the
Facet s keyed by map. |
Iterator<Facet> |
iterator()
Iterates over the
Facet s. |
static InternalFacets |
readFacets(StreamInput in) |
void |
readFrom(StreamInput in) |
static InternalFacets |
readOptionalFacets(StreamInput in) |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
void |
writeTo(StreamOutput out) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public Map<String,Facet> facetsAsMap()
Facet
s keyed by map.facetsAsMap
in interface Facets
public <T extends Facet> T facet(Class<T> facetType, String name)
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent
in interface ToXContent
IOException
public static InternalFacets readFacets(StreamInput in) throws IOException
IOException
public static InternalFacets readOptionalFacets(StreamInput in) throws IOException
IOException
public void readFrom(StreamInput in) throws IOException
readFrom
in interface Streamable
IOException
public void writeTo(StreamOutput out) throws IOException
writeTo
in interface Streamable
IOException
Copyright © 2009–2015. All rights reserved.