public static final class InputGroup.InputGroupBuilder<P extends Enum<P> & InputPart> extends Object
InputGroups.
All InputParts given to the builder will be contained and checked by the finally build group in the
exact order they where given to the builder.
| Modifier and Type | Method and Description |
|---|---|
InputGroup.InputGroupBuilder<P> |
andPart(P inputPart)
Adds the given
InputPart to the InputGroup to build. |
InputGroup.InputGroupBuilder<P> |
andPart(P inputPart,
PartOccurrenceMode partOccurrenceMode)
Adds the given
InputPart to the InputGroup to build. |
InputGroup<P> |
build()
Builds an
InputGroup out of the InputParts currently contained by this InputGroup.InputGroupBuilder. |
InputGroup<P> |
build(boolean matchesAny)
Builds an
InputGroup out of the InputParts currently contained by this
InputGroup.InputGroupBuilder. |
InputGroup<P> |
build(boolean matchesAny,
String spliterator)
Builds an
InputGroup out of the InputParts currently contained by this
InputGroup.InputGroupBuilder. |
InputGroup<P> |
build(String spliterator)
Builds an
InputGroup out of the InputParts currently contained by this
InputGroup.InputGroupBuilder. |
public InputGroup.InputGroupBuilder<P> andPart(P inputPart)
InputPart to the InputGroup to build.inputPart - The part to add; might not be null.public InputGroup.InputGroupBuilder<P> andPart(P inputPart, PartOccurrenceMode partOccurrenceMode)
InputPart to the InputGroup to build.inputPart - The part to add; might not be null.partOccurrenceMode - The mode describing how the part can occur in its group; might not be null.public InputGroup<P> build()
InputGroup out of the InputParts currently contained by this InputGroup.InputGroupBuilder.
matchesAny will be set to true; Even if all the group's parts are optional, at
least one has to match a given term in order for the group to match.
spliterator will be set to " "; the group's parts are expected to be separated by
a space.
InputGroup; never nullpublic InputGroup<P> build(boolean matchesAny)
InputGroup out of the InputParts currently contained by this
InputGroup.InputGroupBuilder.
spliterator will be set to " "; the group's parts are expected to be separated by
a space.
matchesAny - Whether or not any of the group's parts has to match in a given input term. This has only
effect in groups whose parts are all optional; in that case, using false will
allow an empty String to match the group.InputGroup; never nullpublic InputGroup<P> build(String spliterator)
InputGroup out of the InputParts currently contained by this
InputGroup.InputGroupBuilder.
matchesAny will be set to true; Even if all the group's parts are optional, at
least one has to match a given term in order for the group to match.
spliterator - The separator to split an input term by to gain separated InputParts;
might not be null.InputGroup; never nullpublic InputGroup<P> build(boolean matchesAny, String spliterator)
InputGroup out of the InputParts currently contained by this
InputGroup.InputGroupBuilder.matchesAny - Whether or not any of the group's parts has to match in a given input term. This has only
effect in groups whose parts are all optional; in that case, using false will
allow an empty String to match the group.spliterator - The separator to split an input term by to gain separatedInputGroup; never nullCopyright © 2020. All rights reserved.