Class RequirementApplicable<C,R extends Requirement<C,R>>
java.lang.Object
org.incendo.cloud.processors.requirements.RequirementApplicable<C,R>
- Type Parameters:
C- command sender typeR- requirement type
- All Implemented Interfaces:
org.incendo.cloud.Command.Builder.Applicable<C>
@API(status=STABLE,
since="1.0.0")
public final class RequirementApplicable<C,R extends Requirement<C,R>>
extends Object
implements org.incendo.cloud.Command.Builder.Applicable<C>
Utility for adding
Requirements to a Command.Builder.
The requirements can be applied to the command builder by
using Command.Builder.apply(Command.Builder.Applicable).
- Since:
- 1.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classFactory that producesRequirementApplicableinstances. -
Method Summary
Modifier and TypeMethodDescription@NonNull org.incendo.cloud.Command.Builder<C>applyToCommandBuilder(@NonNull org.incendo.cloud.Command.Builder<C> builder) static <C,R extends Requirement<C, R>>
@NonNull RequirementApplicable.RequirementApplicableFactory<C,R> factory(@NonNull org.incendo.cloud.key.CloudKey<Requirements<C, R>> requirementKey) Returns a new factory that createsRequirementApplicableinstances.
-
Method Details
-
factory
public static <C,R extends Requirement<C, @NonNull RequirementApplicable.RequirementApplicableFactory<C,R>> R> factory(@NonNull org.incendo.cloud.key.CloudKey<Requirements<C, R>> requirementKey) Returns a new factory that createsRequirementApplicableinstances.- Type Parameters:
C- command sender typeR- requirement type- Parameters:
requirementKey- key used to store the requirements in the command meta, should be the same as the key supplied toRequirementPostprocessor- Returns:
- the factory
-
applyToCommandBuilder
public @NonNull org.incendo.cloud.Command.Builder<C> applyToCommandBuilder(@NonNull org.incendo.cloud.Command.Builder<C> builder) - Specified by:
applyToCommandBuilderin interfaceorg.incendo.cloud.Command.Builder.Applicable<C>
-