Package edu.fiu.jtlex.data
Class Signal
java.lang.Object
edu.fiu.jtlex.data.Signal
- All Implemented Interfaces:
ISignal
Default implementation of
ISignal.- Since:
- Revision 74
- Author:
- arada002
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns a deep copy clone of the Signal.intgetID()Returns the ID of a Signal.getIdStr()Returns the String format of a Signal ID.Returns the String of a Signal.toJSON()Returns the String ID and String in JSON format.toString()Returns the Signal ID and String in String format.
-
Constructor Details
-
Signal
Creates a new Signal object.- Parameters:
signalID- a unique ID number, must be an integer or will be undefinedsignalString- temporal preposition, conjunction or modifier phrase- Throws:
IllegalArgumentException- if signalID is less than 1 if signalString is empty or all whitespaceNullPointerException- if signalString is null
-
-
Method Details
-
getID
public int getID()Returns the ID of a Signal. Will never return null due to it being required in constructor. -
getIdStr
Returns the String format of a Signal ID. Will never return null since it is required in constructor. -
getSignalString
Returns the String of a Signal. Will never return null because constructor requires a valid string.- Specified by:
getSignalStringin interfaceISignal- Returns:
- the String of a Signal.
- Since:
- Revision 74
-
toString
Returns the Signal ID and String in String format. Will never return null due to constructor requiring them. -
toJSON
Returns the String ID and String in JSON format. Will never return null due to constructor. -
clone
Returns a deep copy clone of the Signal. Will never return null, will always return a valid clone.
-