+ +
+ +

Interface TicketType.Builder<T>

+
+
+
+
All Superinterfaces:
+
ResettableBuilder<T,TicketType.Builder<T>>
+
+
+
Enclosing interface:
+
TicketType<T>
+
+
+
public static interface TicketType.Builder<T> +extends ResettableBuilder<T,TicketType.Builder<T>>
+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      name

      +
      TicketType.Builder<T> name(@NonNull String name)
      +
      Sets the name of the type.
      +
      +
      Parameters:
      +
      name - The name
      +
      Returns:
      +
      The builder, for chaining
      +
      +
      +
    • +
    • +
      +

      comparator

      +
      TicketType.Builder<T> comparator(@Nullable Comparator<T> comparator)
      +
      Sets the comparator used by requested tickets + 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

      +
      TicketType.Builder<T> lifetime(Ticks lifetime)
      +
      Sets the lifetime of the type.
      +
      +
      Parameters:
      +
      lifetime - The lifetime
      +
      Returns:
      +
      The builder, for chaining
      +
      +
      +
    • +
    • +
      +

      build

      +
      TicketType<T> build()
      +
      Builds a new type.
      +
      +
      Returns:
      +
      The type
      +
      +
      +
    • +
    +
    +
  • +
+
+ +