public class LSPValue
extends java.lang.Object
implements java.lang.AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
boolean |
asBool()
Returns the value as a boolean.
|
double |
asDouble()
Returns the value as a double.
|
LSExpression |
asExpression()
Returns the value as a
LSExpression. |
LSPFunction |
asFunction()
Returns the value as a
LSPFunction. |
long |
asInt()
Returns the value as an integer.
|
LSPMap |
asMap()
Returns the value as a
LSPMap. |
LSPModule |
asModule()
Returns the value as a
LSPModule. |
java.lang.String |
asString()
Returns the value as a String.
|
void |
close()
Releases the reference.
|
boolean |
equals(java.lang.Object obj) |
LSPType |
getType()
Returns the type of the value.
|
int |
hashCode() |
boolean |
isBool()
Returns true if the value is a boolean value.
|
boolean |
isDouble()
Returns true if the value is a double value.
|
boolean |
isExpression()
Returns true if the value is an LSExpression.
|
boolean |
isFunction()
Returns true if the value is a LSPFunction.
|
boolean |
isInt()
Returns true if the value is an integer value.
|
boolean |
isMap()
Returns true if the value is an LSPMap.
|
boolean |
isModule()
Returns true if the value is an LSPModule.
|
boolean |
isNil()
Returns true if the value is nil.
|
boolean |
isString()
Returns true if the value is a string.
|
public void close()
Releases the reference. If this value was already released, returns immediately and does nothing. Invoking any method on this object after this operation will throw an exception.
Note: Releasing a reference does not necessarily imply that the underlying value object is destroyed. It is only destroyed if no more references point to it.
close in interface java.lang.AutoCloseablepublic LSPType getType()
LSPTypepublic boolean isInt()
public boolean isDouble()
public boolean isBool()
public boolean isMap()
public boolean isModule()
public boolean isExpression()
public boolean isFunction()
public boolean isString()
public boolean isNil()
public long asInt()
public double asDouble()
public boolean asBool()
public java.lang.String asString()
public LSPFunction asFunction()
LSPFunction. The value must be a function.public LSExpression asExpression()
LSExpression. The value must be an expression.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object