Parsing Engine

danbikel.parser
Class Trainer.EventEntry

java.lang.Object
  extended bydanbikel.util.AbstractMapToPrimitive.Entry
      extended bydanbikel.parser.Trainer.EventEntry
All Implemented Interfaces:
Map.Entry, MapToPrimitive.Entry, Serializable
Enclosing class:
Trainer

public static class Trainer.EventEntry
extends AbstractMapToPrimitive.Entry

Class to represent a MapToPrimitive.Entry object for use by the Trainer.getEventIterator(danbikel.lisp.SexpTokenizer, danbikel.lisp.Symbol) method.

See Also:
Serialized Form

Field Summary
protected  double count
          The observed count of the TrainerEvent object contained by this map entry.
protected  TrainerEvent event
          The TrainerEvent object contained by this map entry.
 
Fields inherited from class danbikel.util.AbstractMapToPrimitive.Entry
key
 
Constructor Summary
Trainer.EventEntry(TrainerEvent event, double count)
          Constructs a new EventEntry instance with the specified TrainerEvent and count.
 
Method Summary
 double getDoubleValue(int idx)
          Returns the double value of the specified index associated with the key in this map entry.
 Object getKey()
          Returns the event key associated with this map entry.
 Object getValue()
          Throws an UnsupportedOperationException.
 boolean replaceKey(Object newKey)
          Throws an UnsupportedOperationException.
 Object setValue(Object value)
          Throws an UnsupportedOperationException.
 
Methods inherited from class danbikel.util.AbstractMapToPrimitive.Entry
add, add, add, add, add, add, add, add, add, add, add, add, getByteValue, getByteValue, getCharValue, getCharValue, getDoubleValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getLongValue, getShortValue, getShortValue, numBytes, numChars, numDoubles, numFloats, numInts, numLongs, numShorts, set, set, set, set, set, set, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map.Entry
equals, hashCode
 

Field Detail

event

protected TrainerEvent event
The TrainerEvent object contained by this map entry.


count

protected double count
The observed count of the TrainerEvent object contained by this map entry.

Constructor Detail

Trainer.EventEntry

public Trainer.EventEntry(TrainerEvent event,
                          double count)
Constructs a new EventEntry instance with the specified TrainerEvent and count.

Parameters:
event - the TrainerEvent of this map entry
count - the observed count of the TrainerEvent of this map entry
Method Detail

getKey

public Object getKey()
Returns the event key associated with this map entry.

Specified by:
getKey in interface Map.Entry
Overrides:
getKey in class AbstractMapToPrimitive.Entry
Returns:
the event key associated with this map entry

getDoubleValue

public double getDoubleValue(int idx)
Description copied from class: AbstractMapToPrimitive.Entry
Returns the double value of the specified index associated with the key in this map entry. If the implementor associates only a single double with its key, then the specified index must be 0.

Specified by:
getDoubleValue in interface MapToPrimitive.Entry
Overrides:
getDoubleValue in class AbstractMapToPrimitive.Entry
Parameters:
idx - the index of the double value to retrieve

getValue

public Object getValue()
Throws an UnsupportedOperationException.

Returns:
an UnsupportedOperationException.

setValue

public Object setValue(Object value)
Throws an UnsupportedOperationException.

Returns:
an UnsupportedOperationException.

replaceKey

public boolean replaceKey(Object newKey)
Throws an UnsupportedOperationException.

Parameters:
newKey - a key equal to the current key as determined by the current key's equals method
Returns:
an UnsupportedOperationException.

Parsing Engine

Author: Dan Bikel.