Class ImmutableCooldownInstance.Builder
java.lang.Object
org.incendo.cloud.processors.cooldown.ImmutableCooldownInstance.Builder
- All Implemented Interfaces:
ImmutableCooldownInstance.BuildFinal,ImmutableCooldownInstance.CreationTimeBuildStage,ImmutableCooldownInstance.DurationBuildStage,ImmutableCooldownInstance.GroupBuildStage,ImmutableCooldownInstance.ProfileBuildStage
- Enclosing class:
- ImmutableCooldownInstance
public static final class ImmutableCooldownInstance.Builder
extends Object
implements ImmutableCooldownInstance.ProfileBuildStage, ImmutableCooldownInstance.GroupBuildStage, ImmutableCooldownInstance.DurationBuildStage, ImmutableCooldownInstance.CreationTimeBuildStage, ImmutableCooldownInstance.BuildFinal
Builds instances of type
ImmutableCooldownInstance.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newImmutableCooldownInstance.creationTime(@NonNull Instant creationTime) Initializes the value for thecreationTimeattribute.Initializes the value for thedurationattribute.group(@NonNull CooldownGroup group) Initializes the value for thegroupattribute.profile(@NonNull CooldownProfile profile) Initializes the value for theprofileattribute.
-
Method Details
-
profile
Initializes the value for theprofileattribute.- Specified by:
profilein interfaceImmutableCooldownInstance.ProfileBuildStage- Parameters:
profile- The value for profile- Returns:
thisbuilder for use in a chained invocation
-
group
Initializes the value for thegroupattribute.- Specified by:
groupin interfaceImmutableCooldownInstance.GroupBuildStage- Parameters:
group- The value for group- Returns:
thisbuilder for use in a chained invocation
-
duration
Initializes the value for thedurationattribute.- Specified by:
durationin interfaceImmutableCooldownInstance.DurationBuildStage- Parameters:
duration- The value for duration- Returns:
thisbuilder for use in a chained invocation
-
creationTime
Initializes the value for thecreationTimeattribute.- Specified by:
creationTimein interfaceImmutableCooldownInstance.CreationTimeBuildStage- Parameters:
creationTime- The value for creationTime- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableCooldownInstance.- Specified by:
buildin interfaceImmutableCooldownInstance.BuildFinal- Returns:
- An immutable instance of CooldownInstance
- Throws:
IllegalStateException- if any required attributes are missing
-