public class FunctionValue
extends java.lang.Object
FunctionValue the result of a function node after performing inference.
A FunctionValue can be either a String, a number or a Boolean.
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Clone the value.
|
boolean |
equals(java.lang.Object obj)
A non-existent value is only equal to another non-existent value.
|
java.lang.Boolean |
getBoolean()
Return the
Boolean corresponding to the value. |
java.lang.String |
getFormattedString()
Return the string representation of the value formatted by the
Formatter associated to the function node that have produced this value. |
java.lang.Number |
getNumber()
Return the
Number corresponding to the value. |
java.lang.String |
getString()
Return the
String corresponding to the value. |
int |
hashCode() |
boolean |
isBoolean()
Test if the value is a
Boolean. |
boolean |
isNumber()
Test if the value is an instance of
Number. |
boolean |
isRealString()
Test if the value is an instance of
String. |
boolean |
isString()
Test if the value can be represented by a
String. |
java.lang.String |
toString()
Return the string representation as returned by
getString. |
public boolean isBoolean()
Boolean.Boolean, false otherwise.public java.lang.Boolean getBoolean()
Boolean corresponding to the value. The method isBoolean should be tested before.public boolean isString()
String.public boolean isRealString()
String.String, false otherwise.public java.lang.String getString()
String corresponding to the value. If the value is a real String, the value is returned as is, otherwise, if the value is an instance of Boolean or Number, the result of the method toString called on the valueis returnpublic boolean isNumber()
Number.Number, false otherwise.public java.lang.Number getNumber()
Number corresponding to the value. The method isNUmber should be tested before.public boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public java.lang.Object clone()
clone in class java.lang.Objectpublic java.lang.String toString()
getString.toString in class java.lang.ObjectgetString()public java.lang.String getFormattedString()
Formatter associated to the function node that have produced this value.