Class DoubleEventTypeImpl<T,E>

java.lang.Object
com.mewna.catnip.shard.event.DoubleEventTypeImpl<T,E>
All Implemented Interfaces:
DoubleEventType<T,E>

public class DoubleEventTypeImpl<T,E> extends Object implements DoubleEventType<T,E>
Since:
3/7/19.
Author:
amy
  • Constructor Details

    • DoubleEventTypeImpl

      public DoubleEventTypeImpl(String key, Class<T> left, Class<E> right)
  • Method Details

    • doubleEvent

      public static <T, E> DoubleEventType<T,E> doubleEvent(@Nonnull String key, @Nonnull Class<T> left, @Nonnull Class<E> right)
    • doubleNotFired

      public static DoubleEventType<Void,Void> doubleNotFired(@Nonnull String key)
    • payloadClasses

      @Nonnull public org.apache.commons.lang3.tuple.Pair<Class<T>,Class<E>> payloadClasses()
      Description copied from interface: DoubleEventType
      Classes sent in the event payload.
      Specified by:
      payloadClasses in interface DoubleEventType<T,E>
      Returns:
      A Pair of the classes that this event fires, in order.
    • key

      public String key()
      Description copied from interface: DoubleEventType
      Key used in the event bus.
      Specified by:
      key in interface DoubleEventType<T,E>
      Returns:
      Key where this event is fired in the bus.
    • left

      public Class<T> left()
      Specified by:
      left in interface DoubleEventType<T,E>
      Returns:
      The "left side" of this event. Is the first event that the consumer must handle.
    • right

      public Class<E> right()
      Specified by:
      right in interface DoubleEventType<T,E>
      Returns:
      The "right side" of this event. Is the second event that the consumer must handle.