Package com.rtfparserkit.parser.standard
Class CommandEvent
- java.lang.Object
-
- com.rtfparserkit.parser.standard.CommandEvent
-
- All Implemented Interfaces:
IParserEvent
class CommandEvent extends java.lang.Object implements IParserEvent
Represents an event to be sent to the listener.
-
-
Field Summary
Fields Modifier and Type Field Description private Commandcommandprivate booleanhasParameterprivate booleanoptionalprivate intparameter
-
Constructor Summary
Constructors Constructor Description CommandEvent(Command command, int parameter, boolean hasParameter, boolean optional)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfire(IRtfListener listener)Pass the event to the listener.CommandgetCommand()Retrieve the command represented by this event.ParserEventTypegetType()Retrieve the event type.java.lang.StringtoString()
-
-
-
Field Detail
-
command
private final Command command
-
parameter
private final int parameter
-
hasParameter
private final boolean hasParameter
-
optional
private final boolean optional
-
-
Constructor Detail
-
CommandEvent
public CommandEvent(Command command, int parameter, boolean hasParameter, boolean optional)
Constructor.
-
-
Method Detail
-
getType
public ParserEventType getType()
Retrieve the event type.- Specified by:
getTypein interfaceIParserEvent
-
fire
public void fire(IRtfListener listener)
Pass the event to the listener.- Specified by:
firein interfaceIParserEvent
-
getCommand
public Command getCommand()
Retrieve the command represented by this event.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-