Package edu.fiu.jtlex.data
Class Event
java.lang.Object
edu.fiu.jtlex.data.Event
- All Implemented Interfaces:
IEvent
Default implementation of
IEvent.- Author:
- arada002
-
Nested Class Summary
Nested classes/interfaces inherited from interface edu.fiu.jtlex.data.IEvent
IEvent.EventClass -
Constructor Summary
ConstructorsConstructorDescriptionEvent(int eID, IEvent.EventClass eventClass, String stem)Creates a new Event with the specified information. -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanReturns the event class to which the object belongs.intgetId()Returns the integer part of the eventId.getIdStr()Returns the full string representation of the eventID.getStem()Returns the stem of the event.toJSON()Returns the JSON (RFC 8259) representation of the event.toString()
-
Constructor Details
-
Event
Creates a new Event with the specified information.- Parameters:
eID- id of the event; may not be 0 or negativeeventClass- the class of the entry may not benullstem- the stem attribute of the event; may not be empty string or all whitespace; may benullif stem is not included in annotation- Throws:
NullPointerException- if eventClass argument isnullIllegalArgumentException- if the stem is empty or all whitespace or eID is 0 or negative
-
-
Method Details
-
getId
public int getId()Description copied from interface:IEventReturns the integer part of the eventId. Each event has to be identified by a unique ID number and String. -
getIdStr
Description copied from interface:IEventReturns the full string representation of the eventID. Each event has to be identified by a unique ID number and String. -
getStem
Description copied from interface:IEventReturns the stem of the event. -
getEventClass
Description copied from interface:IEventReturns the event class to which the object belongs.- Specified by:
getEventClassin interfaceIEvent- Returns:
- the event class to which the object belongs.
May not return
null.
-
toString
-
toJSON
Description copied from interface:IEventReturns the JSON (RFC 8259) representation of the event. -
equals
-
clone
-