Package org.spongepowered.api.event
Class Cause.Builder
java.lang.Object
org.spongepowered.api.event.Cause.Builder
- All Implemented Interfaces:
AbstractBuilder<Cause>
,Builder<Cause,
,Cause.Builder> CopyableBuilder<Cause,
,Cause.Builder> ResettableBuilder<Cause,
Cause.Builder>
- Enclosing class:
- Cause
public static final class Cause.Builder
extends Object
implements Builder<Cause,Cause.Builder>, CopyableBuilder<Cause,Cause.Builder>
-
Method Summary
Modifier and TypeMethodDescriptionAppends the specified object to the cause.appendAll
(Collection<Object> causes) Appends all specified objects onto the cause.build()
build
(EventContext ctx) Constructs a newCause
with information added to the builder.Resets this builder to the values of the given built object.Inserts the specified object into the cause.reset()
Resets this builder to a "default" state such that there is no remaining data to set.
-
Method Details
-
append
Appends the specified object to the cause.- Parameters:
cause
- The object to append to the cause.- Returns:
- The modified builder, for chaining
-
insert
Inserts the specified object into the cause.- Parameters:
position
- The position to insert intocause
- The object to insert into the cause- Returns:
- The modified builder, for chaining
-
appendAll
Appends all specified objects onto the cause.- Parameters:
causes
- The objects to add onto the cause- Returns:
- The modified builder, for chaining
-
from
Description copied from interface:CopyableBuilder
Resets this builder to the values of the given built object.- Specified by:
from
in interfaceCopyableBuilder<Cause,
Cause.Builder> - Parameters:
value
- The built object- Returns:
- This builder, for chaining
-
reset
Description copied from interface:Builder
Resets this builder to a "default" state such that there is no remaining data to set. This is to be the presumed "default" state.- Specified by:
reset
in interfaceBuilder<Cause,
Cause.Builder> - Specified by:
reset
in interfaceResettableBuilder<Cause,
Cause.Builder> - Returns:
- This builder, for chaining
-
build
- Specified by:
build
in interfaceAbstractBuilder<Cause>
-
build
Constructs a newCause
with information added to the builder.- Parameters:
ctx
- The context to build the cause with- Returns:
- The built cause
-