Parsing Engine

danbikel.parser
Interface TrainerEvent

All Superinterfaces:
Serializable
All Known Implementing Classes:
GapEvent, HeadEvent, ModifierEvent, PriorEvent

public interface TrainerEvent
extends Serializable

An interface to allow iteration over various kinds of events used by the class Trainer.


Method Summary
 TrainerEvent copy()
          Returns a deep copy of this event of the same run-time type.
 Word headWord()
          Returns the head word object associated with an event, or null if this TrainerEvent has no such object.
 Word modHeadWord()
          Returns the modifier head word object associated with an event, or null if this TrainerEvent has no such object.
 Symbol parent()
          Returns the parent symbol of this event, or null if this event has no such object.
 void setHeadWord(Word word)
          Sets the head word of this event, or does nothing if this TrainerEvent has no such object.
 TrainerEvent shallowCopy()
          Returns a shallow copy of this event of the same run-time type.
 boolean side()
          Returns the side of a modifier event.
 

Method Detail

headWord

Word headWord()
Returns the head word object associated with an event, or null if this TrainerEvent has no such object.


setHeadWord

void setHeadWord(Word word)
Sets the head word of this event, or does nothing if this TrainerEvent has no such object.

Parameters:
word - the word to set as the head word of this event

modHeadWord

Word modHeadWord()
Returns the modifier head word object associated with an event, or null if this TrainerEvent has no such object.


copy

TrainerEvent copy()
Returns a deep copy of this event of the same run-time type.


shallowCopy

TrainerEvent shallowCopy()
Returns a shallow copy of this event of the same run-time type.


parent

Symbol parent()
Returns the parent symbol of this event, or null if this event has no such object.


side

boolean side()
Returns the side of a modifier event.

Throws:
UnsupportedOperationException - if this is not a modifier event

Parsing Engine

Author: Dan Bikel.