Class Event

  • All Implemented Interfaces:
    IEvent

    public class Event
    extends java.lang.Object
    implements IEvent
    Representation of an event.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.Object content
      The event content.
      protected EventType type
      The event type.
    • Constructor Summary

      Constructors 
      Constructor Description
      Event()
      Create a new Event.
      Event​(EventType type, java.lang.Object content)
      Create a new event.
      Event​(java.lang.String type, java.lang.Object content)
      Create a new event.
    • Field Detail

      • type

        protected EventType type
        The event type.
      • content

        protected java.lang.Object content
        The event content.
    • Constructor Detail

      • Event

        public Event()
        Create a new Event.
      • Event

        public Event​(java.lang.String type,
                     java.lang.Object content)
        Create a new event.
      • Event

        public Event​(EventType type,
                     java.lang.Object content)
        Create a new event.
    • Method Detail

      • getType

        public EventType getType()
        Get the type.
        Specified by:
        getType in interface IEvent
        Returns:
        the type.
      • setType

        public void setType​(EventType type)
        Set the type.
        Parameters:
        type - The type to set.
      • getContent

        public java.lang.Object getContent()
        Get the content.
        Specified by:
        getContent in interface IEvent
        Returns:
        the content.
      • setContent

        public void setContent​(java.lang.Object content)
        Set the content.
        Parameters:
        content - The content to set.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object