Package edu.fiu.jtlex.data
Class Event
java.lang.Object
edu.fiu.jtlex.data.Event
- All Implemented Interfaces:
IEvent
public class Event extends java.lang.Object implements IEvent
Default implementation of
IEvent.- Author:
- arada002
-
Nested Class Summary
-
Constructor Summary
Constructors Constructor Description Event(int eID, IEvent.EventClass eventClass, java.lang.String stem)Creates a new Event with the specified information. -
Method Summary
Modifier and Type Method Description Eventclone()Creates and returns a deep copy of the Event.IEvent.EventClassgetEventClass()Returns the event class of an Event.intgetId()Returns the eID of an Event.java.lang.StringgetIdStr()Grabs the eID, adds an e to the front for String format and returns.java.lang.StringgetStem()Returns the stem of an Event.java.lang.StringtoJSON()Converts the Event and it's info into JSON Format.java.lang.StringtoString()Returns the info of an Event in String Format.
-
Constructor Details
-
Event
Creates a new Event with the specified information.- Parameters:
eID- id of the event; may not be 0 or negative, must be an integereventClass- the class of the entry may not benull, must be an EventClass enumstem- the stem attribute of the event; may not be empty string or all whitespace; may benullif stem is not included in annotation- Throws:
java.lang.NullPointerException- if eventClass argument isnulljava.lang.IllegalArgumentException- if the stem is empty or all whitespace or eID is 0/negative/not an integer or if the eventClass is not an enum.
-
-
Method Details
-
getId
public int getId()Returns the eID of an Event. -
getIdStr
public java.lang.String getIdStr()Grabs the eID, adds an e to the front for String format and returns. -
getStem
public java.lang.String getStem()Returns the stem of an Event. -
getEventClass
Returns the event class of an Event.- Specified by:
getEventClassin interfaceIEvent- Returns:
- the event class of an Event.
-
toString
public java.lang.String toString()Returns the info of an Event in String Format.- Overrides:
toStringin classjava.lang.Object- Returns:
- the info of an Event in String Format.
-
toJSON
public java.lang.String toJSON()Converts the Event and it's info into JSON Format. -
clone
Creates and returns a deep copy of the Event.
-