Package network.aika.fields
Class DoubleField
java.lang.Object
network.aika.fields.FieldListener
network.aika.fields.DoubleField
- All Implemented Interfaces:
DoubleFieldInput
,DoubleFieldInterface
,DoubleFieldOutput
,FieldInput
,FieldOutput
,Writable
- Direct Known Subclasses:
QueueDoubleField
- Author:
- Lukas Molzberger
-
Constructor Summary
ConstructorDescriptionDoubleField
(String label) DoubleField
(String label, FieldUpdateEvent fieldListener) -
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(double u) double
getLabel()
double
double
boolean
void
void
readFields
(DataInput in, Model m) Deserialize the fields of this object fromin
.boolean
set
(double v) void
setPropagatePreCondition
(PropagatePreCondition propagatePreCondition) toString()
protected void
void
boolean
void
write
(DataOutput out) Serialize the fields of this object toout
.Methods inherited from class network.aika.fields.FieldListener
addFieldListener, propagateUpdate, registerOutputs
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface network.aika.fields.DoubleFieldInput
addAndTriggerUpdate, setAndTriggerUpdate
Methods inherited from interface network.aika.fields.FieldOutput
addFieldListener
-
Constructor Details
-
DoubleField
-
DoubleField
-
-
Method Details
-
getLabel
- Specified by:
getLabel
in interfaceFieldInput
- Specified by:
getLabel
in interfaceFieldOutput
-
getPropagatePreCondition
-
setPropagatePreCondition
-
propagateInitialValue
public void propagateInitialValue()- Specified by:
propagateInitialValue
in interfaceFieldOutput
- Specified by:
propagateInitialValue
in classFieldListener
-
getCurrentValue
public double getCurrentValue()- Specified by:
getCurrentValue
in interfaceDoubleFieldOutput
-
getNewValue
public double getNewValue()- Specified by:
getNewValue
in interfaceDoubleFieldOutput
-
set
public boolean set(double v) - Specified by:
set
in interfaceDoubleFieldInput
-
add
public boolean add(double u) - Specified by:
add
in interfaceDoubleFieldInput
-
triggerUpdate
public void triggerUpdate()- Specified by:
triggerUpdate
in interfaceFieldInput
-
triggerInternal
protected void triggerInternal() -
updateAvailable
public boolean updateAvailable()- Specified by:
updateAvailable
in interfaceFieldOutput
-
getUpdate
public double getUpdate()- Specified by:
getUpdate
in interfaceDoubleFieldOutput
-
isInitialized
public boolean isInitialized()- Specified by:
isInitialized
in interfaceFieldOutput
-
write
Description copied from interface:Writable
Serialize the fields of this object toout
.- Specified by:
write
in interfaceWritable
- Parameters:
out
-DataOuput
to serialize this object into.- Throws:
IOException
-
readFields
Description copied from interface:Writable
Deserialize the fields of this object fromin
.For efficiency, implementations should attempt to re-use storage in the existing object where possible.
- Specified by:
readFields
in interfaceWritable
- Parameters:
in
-DataInput
to deseriablize this object from.- Throws:
IOException
-
toString
-