com.jgaap.generics
Class Event

java.lang.Object
  extended by com.jgaap.generics.Event
All Implemented Interfaces:
java.lang.Comparable<java.lang.Object>

public class Event
extends java.lang.Object
implements java.lang.Comparable<java.lang.Object>

In JGAAP, an "event" is a token or feature that will be extracted from the document as an atomic unit.

Since:
1.0
Author:
Astey

Constructor Summary
Event()
           
Event(java.lang.Character data)
          Create a new event given a character representation of the event
Event(java.lang.String data)
          Create a new event given a string representation of this event
 
Method Summary
 int compareTo(java.lang.Object o)
          Overridden - from Comparable interface.
 java.lang.String displayName()
           
 boolean equals(java.lang.Object o)
          Allows for equality comparison of two events.
 java.lang.String getEvent()
          Returns the String representation of this event
 int hashCode()
          When overriding equals(), the hashCode() function must also be overridden.
 boolean showInGUI()
           
 java.lang.String tooltipText()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Event

public Event()

Event

public Event(java.lang.Character data)
Create a new event given a character representation of the event


Event

public Event(java.lang.String data)
Create a new event given a string representation of this event

Method Detail

displayName

public java.lang.String displayName()

tooltipText

public java.lang.String tooltipText()

showInGUI

public boolean showInGUI()

compareTo

public int compareTo(java.lang.Object o)
Overridden - from Comparable interface. Allows for comparison of two events.

Specified by:
compareTo in interface java.lang.Comparable<java.lang.Object>

equals

public boolean equals(java.lang.Object o)
Allows for equality comparison of two events. Two events are the same if their string representations are the same

Overrides:
equals in class java.lang.Object

getEvent

public java.lang.String getEvent()
Returns the String representation of this event


hashCode

public int hashCode()
When overriding equals(), the hashCode() function must also be overridden. Since two events are equal if their string representations are equal, then it is sufficient to say that two events are equal if the hash of their string representations are equal. This comment is longer than the code itself

Overrides:
hashCode in class java.lang.Object

toString

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