Class BusIdentifier<T extends Serializable>

java.lang.Object
de.espirit.firstspirit.event.BusIdentifier<T>
Type Parameters:
T - The type of the events on this bus.
All Implemented Interfaces:
Serializable

public class BusIdentifier<T extends Serializable> extends Object implements Serializable
An identifier for an event bus.
Since:
5.2.220703
See Also:
  • Constructor Details

    • BusIdentifier

      public BusIdentifier(@NotNull @NotNull String identifier, @NotNull @NotNull Class<T> eventType)
      Creates a new BusIdentifier
      Parameters:
      identifier - the unique identifier
      eventType - the type of events handled by this identifier
      Since:
      5.2.220703
  • Method Details

    • identifier

      @NotNull public @NotNull String identifier()
      Returns the unique identifier.
      Returns:
      the unique identifier, never null
      Since:
      5.2.220703
    • eventType

      @NotNull public @NotNull Class<T> eventType()
      Returns the type of events handled by this identifier.
      Returns:
      the type of events handled by this identifier, never null
      Since:
      5.2.220703
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(@Nullable @Nullable Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object