Class CollectionEventInfo<T>

java.lang.Object
org.dizitart.no2.collection.events.CollectionEventInfo<T>

public class CollectionEventInfo<T> extends Object
Represents a collection event data.
Since:
4.0
Author:
Anindya Chatterjee
  • Constructor Details

    • CollectionEventInfo

      public CollectionEventInfo(EventType eventType)
    • CollectionEventInfo

      public CollectionEventInfo()
    • CollectionEventInfo

      public CollectionEventInfo(T item, EventType eventType, long timestamp, String originator)
      Creates a new CollectionEventInfo instance.
      Parameters:
      item - the item that changed.
      eventType - the type of the event.
      timestamp - the unix timestamp of the change.
      originator - name of originator of the event.
  • Method Details

    • getItem

      public T getItem()
      Specifies the item triggering the event.
      Returns:
      the item.
    • getEventType

      public EventType getEventType()
      Specifies the event type.
      Returns:
      the type of the event.
    • getTimestamp

      public long getTimestamp()
      Specifies the unix timestamp of the change.
      Returns:
      the unix timestamp of the change.
    • getOriginator

      public String getOriginator()
      Specifies the name of the originator who has initiated this event.
      Returns:
      name of the originator.
      Since:
      4.0
    • setItem

      public void setItem(T item)
      Specifies the item triggering the event.
      Parameters:
      item - the item that changed.
    • setEventType

      public void setEventType(EventType eventType)
      Specifies the event type.
      Parameters:
      eventType - the type of the event.
    • setTimestamp

      public void setTimestamp(long timestamp)
      Specifies the unix timestamp of the change.
      Parameters:
      timestamp - the unix timestamp of the change.
    • setOriginator

      public void setOriginator(String originator)
      Specifies the name of the originator who has initiated this event.
      Parameters:
      originator - name of originator of the event.
      Since:
      4.0
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object