Interface TicketType.Builder<T>
- All Superinterfaces:
ResettableBuilder<T,
TicketType.Builder<T>>
- Enclosing interface:
TicketType<T>
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a newtype
.comparator
(@Nullable Comparator<T> comparator) Sets thecomparator
used by requestedtickets
of this type used to determine the appropriate ticket to be used during collisions.Sets the lifetime of thetype
.Sets the name of thetype
.Methods inherited from interface org.spongepowered.api.util.ResettableBuilder
reset
-
Method Details
-
name
Sets the name of thetype
.- Parameters:
name
- The name- Returns:
- The builder, for chaining
-
comparator
Sets thecomparator
used by requestedtickets
of this type used to determine the appropriate ticket to be used during collisions.If this call is omitted, it is up to the implementation on how the comparison is handled. In the official implementation, the resulting comparison value is '0'.
- Parameters:
comparator
- The comparator- Returns:
- The builder, for chaining
-
lifetime
Sets the lifetime of thetype
.- Parameters:
lifetime
- The lifetime- Returns:
- The builder, for chaining
-
build
TicketType<T> build()Builds a newtype
.- Returns:
- The type
-