Class AggregateParserBuilder<C>
java.lang.Object
org.incendo.cloud.parser.aggregate.AggregateParserBuilder<C>
- Direct Known Subclasses:
AggregateParserBuilder.MappedAggregateParserBuilder
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class -
Method Summary
Modifier and TypeMethodDescriptionwithComponent(@NonNull String name, @NonNull ParserDescriptor<C, T> parserDescriptor) Returns a new builder with a new component using the givenparserDescriptorinto the component list.withComponent(@NonNull String name, @NonNull ParserDescriptor<C, T> parserDescriptor, @NonNull SuggestionProvider<C> suggestionProvider) Returns a new builder with a new component using the givenparserDescriptorinto the component list.withComponent(@NonNull CommandComponent<C> component) Returns a new builder with the givencomponentinserted into the component list.withComponent(@NonNull CloudKey<T> name, @NonNull ParserDescriptor<C, T> parserDescriptor) Returns a new builder with a new component using the givenparserDescriptorinto the component list.withComponent(@NonNull CloudKey<T> name, @NonNull ParserDescriptor<C, T> parserDescriptor, @NonNull SuggestionProvider<C> suggestionProvider) Returns a new builder with a new component using the givenparserDescriptorinto the component list.final <O> @NonNull AggregateParserBuilder.MappedAggregateParserBuilder<C, O> withDirectMapper(@NonNull TypeToken<O> valueType, @NonNull AggregateResultMapper.DirectSuccessMapper<C, O> mapper) Returns a new builder with the givenmapper.final <O> @NonNull AggregateParserBuilder.MappedAggregateParserBuilder<C, O> withDirectMapper(@NonNull Class<O> valueType, @NonNull AggregateResultMapper.DirectSuccessMapper<C, O> mapper) Returns a new builder with the givenmapper.final <O> @NonNull AggregateParserBuilder.MappedAggregateParserBuilder<C, O> withMapper(@NonNull TypeToken<O> valueType, @NonNull AggregateResultMapper<C, O> mapper) Returns a new builder with the givenmapper.final <O> @NonNull AggregateParserBuilder.MappedAggregateParserBuilder<C, O> withMapper(@NonNull Class<O> valueType, @NonNull AggregateResultMapper<C, O> mapper) Returns a new builder with the givenmapper.
-
Method Details
-
withMapper
public final <O> @NonNull AggregateParserBuilder.MappedAggregateParserBuilder<C,O> withMapper(@NonNull TypeToken<O> valueType, @NonNull AggregateResultMapper<C, O> mapper) Returns a new builder with the givenmapper.- Type Parameters:
O- the type produced by the mapper- Parameters:
valueType- the type produced by the mappermapper- the mapper- Returns:
- the new builder
-
withMapper
public final <O> @NonNull AggregateParserBuilder.MappedAggregateParserBuilder<C,O> withMapper(@NonNull Class<O> valueType, @NonNull AggregateResultMapper<C, O> mapper) Returns a new builder with the givenmapper.- Type Parameters:
O- the type produced by the mapper- Parameters:
valueType- the type produced by the mappermapper- the mapper- Returns:
- the new builder
-
withDirectMapper
public final <O> @NonNull AggregateParserBuilder.MappedAggregateParserBuilder<C,O> withDirectMapper(@NonNull Class<O> valueType, @NonNull AggregateResultMapper.DirectSuccessMapper<C, O> mapper) Returns a new builder with the givenmapper.This version does not need to wrap the result in a
CompletableFuture.- Type Parameters:
O- the type produced by the mapper- Parameters:
valueType- the type produced by the mappermapper- the mapper- Returns:
- the new builder
-
withDirectMapper
public final <O> @NonNull AggregateParserBuilder.MappedAggregateParserBuilder<C,O> withDirectMapper(@NonNull TypeToken<O> valueType, @NonNull AggregateResultMapper.DirectSuccessMapper<C, O> mapper) Returns a new builder with the givenmapper.This version does not need to wrap the result in a
CompletableFuture.- Type Parameters:
O- the type produced by the mapper- Parameters:
valueType- the type produced by the mappermapper- the mapper- Returns:
- the new builder
-
withComponent
Returns a new builder with the givencomponentinserted into the component list.- Parameters:
component- the component- Returns:
- the new builder
-
withComponent
public <T> @NonNull AggregateParserBuilder<C> withComponent(@NonNull String name, @NonNull ParserDescriptor<C, T> parserDescriptor) Returns a new builder with a new component using the givenparserDescriptorinto the component list.- Type Parameters:
T- the type of the parser- Parameters:
name- the name of the componentparserDescriptor- the parser- Returns:
- the new builder
-
withComponent
public <T> @NonNull AggregateParserBuilder<C> withComponent(@NonNull String name, @NonNull ParserDescriptor<C, T> parserDescriptor, @NonNull SuggestionProvider<C> suggestionProvider) Returns a new builder with a new component using the givenparserDescriptorinto the component list.- Type Parameters:
T- the type of the parser- Parameters:
name- the name of the componentparserDescriptor- the parsersuggestionProvider- custom suggestion provider- Returns:
- the new builder
-
withComponent
public <T> @NonNull AggregateParserBuilder<C> withComponent(@NonNull CloudKey<T> name, @NonNull ParserDescriptor<C, T> parserDescriptor) Returns a new builder with a new component using the givenparserDescriptorinto the component list.- Type Parameters:
T- the type of the parser- Parameters:
name- the name of the componentparserDescriptor- the parser- Returns:
- the new builder
-
withComponent
public <T> @NonNull AggregateParserBuilder<C> withComponent(@NonNull CloudKey<T> name, @NonNull ParserDescriptor<C, T> parserDescriptor, @NonNull SuggestionProvider<C> suggestionProvider) Returns a new builder with a new component using the givenparserDescriptorinto the component list.- Type Parameters:
T- the type of the parser- Parameters:
name- the name of the componentparserDescriptor- the parsersuggestionProvider- custom suggestion provider- Returns:
- the new builder
-