public class InternalFacets extends Object implements Facets, Streamable, ToXContent, Iterable<Facet>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsEMPTY_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
Facets. |
Map<String,Facet> |
facetsAsMap()
Returns the
Facets keyed by map. |
Map<String,Facet> |
getFacets()
Returns the
Facets keyed by map. |
Iterator<Facet> |
iterator()
Iterates over the
Facets. |
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, waitforEach, spliteratorpublic Map<String,Facet> facetsAsMap()
Facets keyed by map.facetsAsMap in interface Facetspublic <T extends Facet> T facet(Class<T> facetType, String name)
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent in interface ToXContentIOExceptionpublic static InternalFacets readFacets(StreamInput in) throws IOException
IOExceptionpublic static InternalFacets readOptionalFacets(StreamInput in) throws IOException
IOExceptionpublic void readFrom(StreamInput in) throws IOException
readFrom in interface StreamableIOExceptionpublic void writeTo(StreamOutput out) throws IOException
writeTo in interface StreamableIOExceptionCopyright © 2009–2016. All rights reserved.