Package localsolver.modeler
Enum LSPType
- java.lang.Object
-
- java.lang.Enum<LSPType>
-
- localsolver.modeler.LSPType
-
-
Enum Constant Summary
Enum Constants Enum Constant Description Double
Double precision floating point numbers (stored on 64 bits) in IEEE 754 binary floating point representation.Expression
LSExpressions are the variables and the expressions of the mathematical model defined by the LSP program or directly in the LocalSolver API.Function
Function of the modeler.Int
Integers are positive and negative integral numbers stored on 64 bits.Map
Maps are data structure matching some values to some keys.Module
A module is a collection of global variables.Nil
Nil is the equivalent of null in Java.Other
Any other value used in the modeler but not exposed in this API (dates, files or streams for example).String
A string is an immutable sequence of unicode characters.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LSPType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static LSPType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
Nil
public static final LSPType Nil
Nil is the equivalent of null in Java. The single value of this type is accessed through the keyword nil in LSP. It is used to signify the absence of a value. Nil is the default returned value for functions that don’t explicitly return anything. It’s also the default value assigned by the modeler to every global and local variable.
-
Int
public static final LSPType Int
Integers are positive and negative integral numbers stored on 64 bits. They are created by integer literals or returned as results of arithmetic operations.
-
Double
public static final LSPType Double
Double precision floating point numbers (stored on 64 bits) in IEEE 754 binary floating point representation. They are created by floating point literals or returned as results of arithmetic operations.
-
String
public static final LSPType String
A string is an immutable sequence of unicode characters.
-
Expression
public static final LSPType Expression
LSExpressions are the variables and the expressions of the mathematical model defined by the LSP program or directly in the LocalSolver API.
-
Function
public static final LSPType Function
Function of the modeler. A function can be written in LSP (user-defined function) or can be a function written in Java and exposed to the user in LSP. The LSP language treats functions as first-class citizens. In other words, a function is a value with a particular type. Thus, functions can be passed as arguments to other functions, can be assigned to variables or returned by other functions.
-
Map
public static final LSPType Map
Maps are data structure matching some values to some keys. This is the main data structure in LSP that can also be used as an array-like structure.
-
Module
public static final LSPType Module
A module is a collection of global variables. Modules are used to group functions together and import them dynamically at runtime. The I/O library is an example of a module. Each LSP file is a module.
-
Other
public static final LSPType Other
Any other value used in the modeler but not exposed in this API (dates, files or streams for example).
-
-
Method Detail
-
values
public static LSPType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (LSPType c : LSPType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static LSPType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-