Class AbstractEvent<T extends Enum,​S>

    • Constructor Detail

      • AbstractEvent

        protected AbstractEvent​(T type,
                                S subject)
        Creates an event of a given type and for the specified subject and the current time.
        Parameters:
        type - event type
        subject - event subject
      • AbstractEvent

        protected AbstractEvent​(T type,
                                S subject,
                                long time)
        Creates an event of a given type and for the specified subject and time.
        Parameters:
        type - event type
        subject - event subject
        time - occurrence time
    • Method Detail

      • time

        public long time()
        Description copied from interface: Event
        Returns the timestamp of when the event occurred, given in milliseconds since the start of epoch.
        Specified by:
        time in interface Event<T extends Enum,​S>
        Returns:
        timestamp in milliseconds
      • type

        public T type()
        Description copied from interface: Event
        Returns the type of the event.
        Specified by:
        type in interface Event<T extends Enum,​S>
        Returns:
        event type
      • subject

        public S subject()
        Description copied from interface: Event
        Returns the subject of the event.
        Specified by:
        subject in interface Event<T extends Enum,​S>
        Returns:
        subject to which this event pertains