gumbo.util.route
Class DoubleField

java.lang.Object
  |
  +--gumbo.util.AbstractDisposable
        |
        +--gumbo.util.route.EventNode
              |
              +--gumbo.util.route.EventDataNode
                    |
                    +--gumbo.util.route.DoubleField
All Implemented Interfaces:
Disposable, EventNodeMarker
Direct Known Subclasses:
DoubleField.EventIn, DoubleField.EventInOut, DoubleField.EventOut

public class DoubleField
extends EventDataNode

Version:
$Revision: 1.2 $
Author:
Jon Barrilleaux (jonb@jmbaai.com) of JMB and Associates Inc.

Nested Class Summary
static class DoubleField.EventIn
           
static class DoubleField.EventInOut
           
static class DoubleField.EventOut
           
 
Constructor Summary
DoubleField()
           
DoubleField(double init)
           
 
Method Summary
protected  void checkSender(EventDataNode sender)
          Called by the system (subclasses) to check a sender before connecting it to this node.
protected  void checkValue(double value)
          Called by the system to check new data values.
 double get()
          Gets this field's data value.
protected  java.lang.String getDataValue()
          Get this node's data value as a string.
 boolean implSend(double value)
          Sets this field's data value and sends it to its receivers, without event processing and regardless of event relaying.
 void implSet(double value)
          Checks and sets this field's data value, without event processing or event relaying.
 boolean set(double value)
          Equivalent to receiving an event with the specified data value.
 
Methods inherited from class gumbo.util.route.EventDataNode
checkRouter, enableDebug, getReceivers, getRelayType, getSenders, implDispose, implSend, implSysProcess, isReceiver, isSender, process, setDebug, setDebug, setRelayType, sync
 
Methods inherited from class gumbo.util.route.EventNode
isLocked
 
Methods inherited from class gumbo.util.AbstractDisposable
dispose, isDisposed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleField

public DoubleField()

DoubleField

public DoubleField(double init)
Method Detail

get

public final double get()
Gets this field's data value.


set

public final boolean set(double value)
Equivalent to receiving an event with the specified data value. Sets this field's data value, processes the event and, if enabled, relays the event to receivers.


implSend

public final boolean implSend(double value)
Sets this field's data value and sends it to its receivers, without event processing and regardless of event relaying.


implSet

public final void implSet(double value)
Checks and sets this field's data value, without event processing or event relaying. Calls checkValue() for value checking.


checkValue

protected void checkValue(double value)
Called by the system to check new data values. Implementers should throw an exception if the value is invalid. The default implementation does nothing.


checkSender

protected void checkSender(EventDataNode sender)
Description copied from class: EventDataNode
Called by the system (subclasses) to check a sender before connecting it to this node. Implementers should throw an exception if the sender is invalid, and can assume that the sender is non-null.

Specified by:
checkSender in class EventDataNode

getDataValue

protected java.lang.String getDataValue()
Description copied from class: EventDataNode
Get this node's data value as a string. Used by the system to contruct a debug message.

Specified by:
getDataValue in class EventDataNode
Returns:
The data value. Empty if no value (NotifyNode). Never null.