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 |
---|
Discrete(java.lang.String name,
boolean hasLwb,
int lwb,
boolean hasUpb,
int upb)
Note, this is assumed to be un-
ordered . |
Discrete(java.lang.String name,
boolean hasLwb,
int lwb,
boolean hasUpb,
int upb,
boolean ordered)
|
Modifier and Type | Method and Description |
---|---|
boolean |
bounded()
|
Value.Tuple |
bounds()
|
boolean |
hasLwb()
Does 'this' Discrete have a
lwb ? |
boolean |
hasUpb()
Does 'this' Discrete have a
upb ? |
abstract Value.Discrete |
int2value(int n)
Convert an int, n, into a Value of 'this' Discrete Type.
|
int |
lwb_n()
'this' Discrete's int lower bound - if any,
else exception, alse see
lwb . |
Value |
lwb()
'this' Discrete's lower bound if any otherwise an Exception;
also see
lwb_n() . |
boolean |
ordered()
Is 'this' Type ordered, or not?
|
abstract int |
string2n(java.lang.String s)
Return the int "code" for a constant denoted by String 's'.
|
Value.Discrete |
string2value(java.lang.String s)
|
boolean |
unOrdered()
Return not
ordered() . |
int |
upb_n()
'this' Discrete's int upper bound - if any,
else exception, alse see
upb . |
Value |
upb()
'this' Discrete's upper bound if any otherwise an Exception;
also see
upb_n() . |
appendSB, contains, elt, main, nElts, ni, show, show, toString, tuple, type
public Discrete(java.lang.String name, boolean hasLwb, int lwb, boolean hasUpb, int upb)
ordered
.public Discrete(java.lang.String name, boolean hasLwb, int lwb, boolean hasUpb, int upb, boolean ordered)
public abstract Value.Discrete int2value(int n)
string2n
and
string2value
.public abstract int string2n(java.lang.String s)
string2value
and
int2value
.public Value.Discrete string2value(java.lang.String s)
public boolean bounded()
public boolean hasLwb()
lwb
?public boolean hasUpb()
upb
?public Value.Tuple bounds()
public Value lwb()
lwb_n()
.public Value upb()
upb_n()
.public int lwb_n()
lwb
.public int upb_n()
upb
.public boolean ordered()
ordered
in class Type.Atomic
public boolean unOrdered()
ordered()
.