Class TokenDetail.Builder
java.lang.Object
co.elastic.clients.elasticsearch.indices.analyze.TokenDetail.Builder
- All Implemented Interfaces:
ObjectBuilder<TokenDetail>
- Enclosing class:
- TokenDetail
public static class TokenDetail.Builder extends java.lang.Object implements ObjectBuilder<TokenDetail>
Builder for
TokenDetail
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description TokenDetail.Builder
addTokens(ExplainAnalyzeToken value)
Add a value totokens(List)
, creating the list if needed.TokenDetail.Builder
addTokens(java.util.function.Function<ExplainAnalyzeToken.Builder,ObjectBuilder<ExplainAnalyzeToken>> fn)
Add a value totokens(List)
, creating the list if needed.TokenDetail
build()
Builds aTokenDetail
.TokenDetail.Builder
name(java.lang.String value)
Required - API name:name
TokenDetail.Builder
tokens(ExplainAnalyzeToken... value)
Required - API name:tokens
TokenDetail.Builder
tokens(java.util.function.Function<ExplainAnalyzeToken.Builder,ObjectBuilder<ExplainAnalyzeToken>> fn)
Settokens(List)
to a singleton list.TokenDetail.Builder
tokens(java.util.List<ExplainAnalyzeToken> value)
Required - API name:tokens
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
name
Required - API name:name
-
tokens
Required - API name:tokens
-
tokens
Required - API name:tokens
-
addTokens
Add a value totokens(List)
, creating the list if needed. -
tokens
public TokenDetail.Builder tokens(java.util.function.Function<ExplainAnalyzeToken.Builder,ObjectBuilder<ExplainAnalyzeToken>> fn)Settokens(List)
to a singleton list. -
addTokens
public TokenDetail.Builder addTokens(java.util.function.Function<ExplainAnalyzeToken.Builder,ObjectBuilder<ExplainAnalyzeToken>> fn)Add a value totokens(List)
, creating the list if needed. -
build
Builds aTokenDetail
.- Specified by:
build
in interfaceObjectBuilder<TokenDetail>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-