public abstract class Value
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Attribute |
attribute |
protected boolean |
isObservable |
Constructor and Description |
---|
Value(Attribute attribute)
Initializes this value to be an assignment for Attribute attribute.
|
Value(Value v)
Initializes this value as a copy from the source Value object v.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
addAllRelationalTargets(java.util.Collection<java.lang.String> targets) |
abstract void |
addRelationalTarget(java.lang.String t)
adds a relational target for the object instance named t
|
java.lang.String |
attName()
The name of the Attribute object for which this is a value assignment.
|
abstract void |
clearRelationTargets()
Removes any relational targets for this attribute
|
abstract Value |
copy()
Creates a deep copy of this value object.
|
abstract java.util.Set<java.lang.String> |
getAllRelationalTargets()
Returns the ordered set of all relational targets of this object.
|
Attribute |
getAttribute()
Returns the Attribute object for which this is a value assignment.
|
abstract boolean |
getBooleanValue()
Returns the boolean value of this attibute.
|
abstract int |
getDiscVal()
Returns the discrete integer value of this Value object
|
abstract double[] |
getDoubleArray()
Returns a double array value
|
abstract int[] |
getIntArray()
Returns an int array value
|
abstract double |
getNumericRepresentation()
Returns a numeric double representation of this value.
|
abstract double |
getRealVal()
Returns the real-valued double value of this Value object
|
abstract java.lang.String |
getStringVal()
Returns the string value of this Value object
|
boolean |
isObservable()
Returns whether this value is observable to the agent or not.
|
abstract void |
removeRelationalTarget(java.lang.String target)
Removes a specific relational target from the relational value in relational attribute.
|
void |
setObservability(boolean isObservable)
Sets whether this value is observable to the agent or not.
|
abstract void |
setValue(boolean v)
Sets the internalvalue representation using a boolean value
|
abstract void |
setValue(double v)
Sets the internal value representation using a double value
|
abstract void |
setValue(double[] doubleArray)
Sets the double array value.
|
abstract void |
setValue(int v)
Sets the internal value representation using an int value
|
abstract void |
setValue(int[] intArray)
Sets the int array value.
|
abstract void |
setValue(java.lang.String v)
Sets the internal value representation using a string value
|
java.lang.String |
toString() |
abstract boolean |
valueHasBeenSet()
Returns whether the value has been set to a meaningful value.
|
protected Attribute attribute
protected boolean isObservable
public Value(Attribute attribute)
attribute
- public Value(Value v)
v
- the source Value to make this object a copy of.public Attribute getAttribute()
public java.lang.String attName()
public void setObservability(boolean isObservable)
isObservable
- true if this value is observable to the agent; false otherwise.public boolean isObservable()
public java.lang.String toString()
toString
in class java.lang.Object
public abstract Value copy()
public abstract boolean valueHasBeenSet()
public abstract void setValue(int v)
v
- the int value assignmentpublic abstract void setValue(double v)
v
- the double value assignmentpublic abstract void setValue(java.lang.String v)
v
- the string value assignmentpublic abstract void addRelationalTarget(java.lang.String t)
t
- the name of the object instance targetpublic abstract void addAllRelationalTargets(java.util.Collection<java.lang.String> targets)
public abstract void clearRelationTargets()
public abstract void removeRelationalTarget(java.lang.String target)
target
- the object name identifier to removepublic abstract void setValue(boolean v)
v
- the boolean valuepublic abstract void setValue(int[] intArray)
intArray
- the int array value to set.public abstract void setValue(double[] doubleArray)
doubleArray
- the double array value to set.public abstract int getDiscVal()
public abstract double getRealVal()
public abstract java.lang.String getStringVal()
public abstract java.util.Set<java.lang.String> getAllRelationalTargets()
public abstract boolean getBooleanValue()
public abstract int[] getIntArray()
public abstract double[] getDoubleArray()
public abstract double getNumericRepresentation()