Package jadex.bridge.nonfunctional
Class SimpleValueNFProperty<T,U>
- java.lang.Object
-
- jadex.bridge.nonfunctional.AbstractNFProperty<T,U>
-
- jadex.bridge.nonfunctional.SimpleValueNFProperty<T,U>
-
- All Implemented Interfaces:
INFProperty<T,U>
- Direct Known Subclasses:
NFRootProperty
,TimedProperty
,WaitqueueProperty
public abstract class SimpleValueNFProperty<T,U> extends AbstractNFProperty<T,U>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jadex.bridge.nonfunctional.INFProperty
INFProperty.Target
-
-
Field Summary
Fields Modifier and Type Field Description protected IInternalAccess
comp
The component.protected T
value
The current value.-
Fields inherited from class jadex.bridge.nonfunctional.AbstractNFProperty
metainfo
-
-
Constructor Summary
Constructors Constructor Description SimpleValueNFProperty(IInternalAccess comp, NFPropertyMetaInfo mi)
Create a new property.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description IInternalAccess
getComponent()
Get the component.IFuture<java.lang.String>
getPrettyPrintValue()
Returns the current value of the property in a human readable form.IFuture<T>
getValue(U unit)
Get the value converted by a unit.abstract T
measureValue()
Measure the value.void
setValue(T value)
Set the value.-
Methods inherited from class jadex.bridge.nonfunctional.AbstractNFProperty
createProperty, dispose, getMetaInfo, getName, getValue, readNFProperties
-
-
-
-
Field Detail
-
value
protected T value
The current value.
-
comp
protected IInternalAccess comp
The component.
-
-
Constructor Detail
-
SimpleValueNFProperty
public SimpleValueNFProperty(IInternalAccess comp, NFPropertyMetaInfo mi)
Create a new property.
-
-
Method Detail
-
getValue
public IFuture<T> getValue(U unit)
Get the value converted by a unit.- Parameters:
unit
- Unit of the returned value.- Returns:
- The current value of the property.
-
getPrettyPrintValue
public IFuture<java.lang.String> getPrettyPrintValue()
Returns the current value of the property in a human readable form.- Specified by:
getPrettyPrintValue
in interfaceINFProperty<T,U>
- Overrides:
getPrettyPrintValue
in classAbstractNFProperty<T,U>
- Returns:
- The current value of the property.
-
setValue
public void setValue(T value)
Set the value.- Parameters:
value
- The value to set.
-
measureValue
public abstract T measureValue()
Measure the value.
-
getComponent
public IInternalAccess getComponent()
Get the component.- Returns:
- The component.
-
-