Class RequirementApplicable<C,R extends Requirement<C,R>>

java.lang.Object
org.incendo.cloud.processors.requirements.RequirementApplicable<C,R>
Type Parameters:
C - command sender type
R - 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
  • Method Details

    • factory

      public 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 creates RequirementApplicable instances.
      Type Parameters:
      C - command sender type
      R - requirement type
      Parameters:
      requirementKey - key used to store the requirements in the command meta, should be the same as the key supplied to RequirementPostprocessor
      Returns:
      the factory
    • applyToCommandBuilder

      public @NonNull org.incendo.cloud.Command.Builder<C> applyToCommandBuilder(@NonNull org.incendo.cloud.Command.Builder<C> builder)
      Specified by:
      applyToCommandBuilder in interface org.incendo.cloud.Command.Builder.Applicable<C>