public static class Type.Int extends Type.Discrete
Type.Atomic, Type.Char, Type.Cts, Type.Discrete, Type.Enum, Type.Function, Type.Int, Type.Model, Type.Option, Type.Structured, Type.Triv, Type.Tuple, Type.TYPE, Type.Vector
Value.Option.GP
Value.Bool, Value.Chars, Value.Defer, Value.Inc_Or, Value.Lambda, Value.List, Value.Maybe, Value.Real, Value.Scannable
BOOL, BOOL_N, CHAR, CHAR_N, CHARS, CTS, CTS_N, DNA, ENUM_N, FUNCTION, FUNCTION_N, INC_OR, INT, INT_N, LIST, MATRIX_CTS, MATRIX_INT, MAYBE, MODEL, MODEL_N, name, OPTION_N, PAIR, TRIPLE, TRIV, TRIV_N, TUPLE_N, TYPE, TYPE_N, VECTOR, VECTOR_CHARS, VECTOR_CTS, VECTOR_INT, VECTOR_N
Constructor and Description |
---|
Int(java.lang.String name)
Construct "the" Int Type.
|
Int(java.lang.String name,
boolean hasLwb,
int lwb,
boolean hasUpb,
int upb)
Construct an Int Type possibly bounded above, or below, or both.
|
Modifier and Type | Method and Description |
---|---|
Value.Int |
int2value(int n)
Return (a new)
Value.Int (n). |
int |
n()
Return
INT_N . |
int |
string2n(java.lang.String s)
Return an int from a String such as "123", "-456" or even
" + 789".
|
bounded, bounds, hasLwb, hasUpb, lwb_n, lwb, ordered, string2value, unOrdered, upb_n, upb
appendSB, contains, elt, main, nElts, ni, show, show, toString, tuple, type
closes, compareTo, opens, separator
public Int(java.lang.String name)
public Int(java.lang.String name, boolean hasLwb, int lwb, boolean hasUpb, int upb)
public int n()
INT_N
.n
in class Value.Option
public Value.Int int2value(int n)
Value.Int
(n).int2value
in class Type.Discrete
public int string2n(java.lang.String s)
Lexical
to
parse s permits FP comments in it.string2n
in class Type.Discrete