public static class WrappedAttributeModifier.Builder
extends java.lang.Object
Use WrappedAttributeModifier.newBuilder()
to construct an instance of the builder.
Modifier and Type | Method and Description |
---|---|
WrappedAttributeModifier.Builder |
amount(double amount)
Set the amount to modify in the operation.
|
WrappedAttributeModifier |
build()
Construct a new attribute modifier and its wrapper using the supplied values in this builder.
|
WrappedAttributeModifier.Builder |
name(java.lang.String name)
Set a human readable name of this modifier.
|
WrappedAttributeModifier.Builder |
operation(WrappedAttributeModifier.Operation operation)
Set the operation that is used to compute the final attribute value.
|
WrappedAttributeModifier.Builder |
uuid(java.util.UUID uuid)
Set the unique UUID that identifies the origin of this modifier.
|
public WrappedAttributeModifier.Builder uuid(@Nonnull java.util.UUID uuid)
This parameter is automatically supplied with a random UUID, or the UUID from an attribute modifier to clone.
uuid
- - the uuid to supply to the new object.public WrappedAttributeModifier.Builder operation(@Nonnull WrappedAttributeModifier.Operation operation)
operation
- - the operation to supply to the new object.public WrappedAttributeModifier.Builder name(@Nonnull java.lang.String name)
name
- - the name of the modifier.public WrappedAttributeModifier.Builder amount(double amount)
amount
- - the amount to supply to the new object.public WrappedAttributeModifier build()
java.lang.NullPointerException
- If UUID has not been set.java.lang.RuntimeException
- If we are unable to construct the underlying attribute modifier.