LSPValue Class¶
- class localsolver.modeler.LSPValue¶
General value container. Any value can be contained in an instance of this class (integer, double, boolean, string, LSExpression, module, map, function and also non exposed types like files or dates).
- Since
10.0
Summary¶
Returns the type of the value. |
|
Returns true if the value is a nil value. |
|
Returns true if the value is an integer value. |
|
Returns true if the value is a double value. |
|
Returns true if the value is a boolean value. |
|
Returns true if the value is a string value. |
|
Returns true if the value is a LSExpression. |
|
Returns true if the value is a LSPFunction. |
|
Returns true if the value is a LSPModule. |
|
Returns true if the value is a LSPMap. |
|
Returns the value as an integer. |
|
Returns the value as a double. |
|
Returns the value as a boolean. |
|
Returns the value as a string. |
|
Returns the value as an expression. |
|
Returns the value as a function. |
|
Returns the value as a module. |
|
Returns the value as a map. |
Instance methods¶
- LSPType GetValueType()¶
Returns the type of the value.
- Returns
The type of the value.
- Return type
- bool IsNil()¶
Returns true if the value is a nil value.
- bool IsInt()¶
Returns true if the value is an integer value.
- bool IsDouble()¶
Returns true if the value is a double value.
- bool IsBool()¶
Returns true if the value is a boolean value.
- bool IsString()¶
Returns true if the value is a string value.
- bool IsExpression()¶
Returns true if the value is a
LSExpression
.
- bool IsFunction()¶
Returns true if the value is a
LSPFunction
.
- long AsInt()¶
Returns the value as an integer. The value must be an integer.
- Returns
Integer value.
- Return type
long
- double AsDouble()¶
Returns the value as a double. The value must be a double.
- Returns
Double value.
- Return type
double
- bool AsBool()¶
Returns the value as a boolean. The value must be a boolean.
- Returns
Boolean value.
- Return type
bool
- string AsString()¶
Returns the value as a string. The value must be a string.
- Returns
String value.
- Return type
string
- LSExpression AsExpression()¶
Returns the value as an expression. The value must be a
LSExpression
.- Returns
Expression value.
- Return type
- LSPFunction AsFunction()¶
Returns the value as a function. The value must be a
LSPFunction
.- Returns
Function value.
- Return type