public abstract class Type extends Value.Option
Values
;
it is for a very simple dynamic type system;
Type.Enum
and Type.Option
are interesting.Modifier and Type | Class and Description |
---|---|
static class |
Type.Atomic
|
static class |
Type.Char
The class of the
CHAR Type. |
static class |
Type.Cts
The class of the
CTS Type. |
static class |
Type.Discrete
The superclass of Discrete Types.
|
static class |
Type.Enum
Enum Types, e.g., DNA={A,C,G,T}, types of
Value.Enum . |
static class |
Type.Function
Function Types.
|
static class |
Type.Int
The class of the
INT Type. |
static class |
Type.Model
Model Types.
|
static class |
Type.Option
Option Types, e.g.,
Value.List : LIST ,Type.Enum . |
static class |
Type.Structured
Superclass of
Type.Vector etc; also see Type.Atomic . |
static class |
Type.Triv
The class of the
TRIV Type. |
static class |
Type.Tuple
The Types of k-Tuples; there is a different type for each value of k.
|
static class |
Type.TYPE
The class of the Type of a Type; see
TYPE . |
static class |
Type.Vector |
Value.Option.GP
Value.Bool, Value.Chars, Value.Defer, Value.Inc_Or, Value.Lambda, Value.List, Value.Maybe, Value.Real, Value.Scannable
Modifier and Type | Field and Description |
---|---|
static Type.Enum |
BOOL
Also see
Value.Bool . |
static int |
BOOL_N
Integer codes for various "types" of Type.
|
static Type.Char |
CHAR
Also see
Value.Char . |
static int |
CHAR_N
Integer codes for various "types" of Type.
|
static Type |
CHARS
Also see
Value.Chars . |
static Type |
CTS
Also see
Value.Cts . |
static int |
CTS_N
Integer codes for various "types" of Type.
|
static Type.Enum |
DNA
DNA, an example
Type.Enum Type. |
static int |
ENUM_N
Integer codes for various "types" of Type.
|
static Type |
FUNCTION
Also see
Function . |
static int |
FUNCTION_N
Integer codes for various "types" of Type.
|
static Type.Option |
INC_OR
Inclusive Or, as in
Inc_Or Int Char, say. |
static Type.Int |
INT
Also see
Value.Int . |
static int |
INT_N
Integer codes for various "types" of Type.
|
static Type.Option |
LIST
Also see
Value.List . |
static Type |
MATRIX_CTS |
static Type |
MATRIX_INT |
static Type.Option |
MAYBE
Maybe T, for optional Values, missing data, etc. |
static Type |
MODEL
|
static int |
MODEL_N
Integer codes for various "types" of Type.
|
protected java.lang.String |
name
The (optional) name of 'this' Type.
|
static int |
OPTION_N
Integer codes for various "types" of Type.
|
static Type.Tuple |
PAIR
Also see
Value.Tuple . |
static Type.Tuple |
TRIPLE
Also see
Value.Tuple . |
static Type.Triv |
TRIV
Also see
Value.Triv . |
static int |
TRIV_N
Integer codes for various "types" of Type.
|
static int |
TUPLE_N
Integer codes for various "types" of Type.
|
static Type |
TYPE
The Type of a Type is TYPE.
|
static int |
TYPE_N
Integer codes for various "types" of Type.
|
static Type |
VECTOR |
static Type.Vector |
VECTOR_CHARS |
static Type.Vector |
VECTOR_CTS |
static Type.Vector |
VECTOR_INT |
static int |
VECTOR_N
Integer codes for various "types" of Type.
|
Constructor and Description |
---|
Type(java.lang.String name)
Special case when ids={} and arities={}.
|
Modifier and Type | Method and Description |
---|---|
void |
appendSB(java.lang.StringBuffer sb)
|
boolean |
contains(Type t)
Does 'this' Type contain (or equal) Type 't'?
|
Value |
elt(int i)
This default throws an error, inapplicable.
|
static void |
main(java.lang.String[] argv)
'main' allows Type to be tested (v.slightly) on its own
e.g.,
|
int |
nElts()
This default returns 0; override it if necessary.
|
boolean |
ni(Value v)
¿Is Value v's in this Type; does Value 'v' have
exactly 'this' Type? (--???or_Inclusion???)
|
static java.lang.String |
show(Value v)
Show a Value 'v' -- which must not be infinite, or even "big".
|
static java.lang.String |
show(Value[] vs)
show(Value) several Values. |
java.lang.String |
toString()
Return a String representation of 'this' Type.
|
static Type.Tuple |
tuple(int k)
[null, null, PAIR, TRIPLE, 4_Tuple, ...].
|
Type |
type()
Return
TYPE . |
public static final int TRIV_N
public static final int BOOL_N
public static final int CHAR_N
public static final int INT_N
public static final int CTS_N
public static final int ENUM_N
public static final int OPTION_N
public static final int VECTOR_N
public static final int TUPLE_N
public static final int FUNCTION_N
public static final int MODEL_N
public static final int TYPE_N
protected final java.lang.String name
public static final Type TYPE
Type.TYPE
.public static final Type.Triv TRIV
Value.Triv
.public static final Type.Enum BOOL
Value.Bool
.public static final Type.Char CHAR
Value.Char
.public static final Type CHARS
Value.Chars
.public static final Type VECTOR
public static final Type.Vector VECTOR_CTS
public static final Type MATRIX_CTS
public static final Type.Vector VECTOR_INT
public static final Type MATRIX_INT
public static final Type.Vector VECTOR_CHARS
public static final Type.Tuple PAIR
Value.Tuple
.public static final Type.Tuple TRIPLE
Value.Tuple
.public static final Type.Option LIST
Value.List
.public static final Type.Option MAYBE
Maybe
T, for optional Values, missing data, etc.public static final Type.Option INC_OR
Inc_Or
Int Char, say.public static final Type MODEL
public int nElts()
nElts
in class Value.Option
public Value elt(int i)
elt
in class Value.Structured
public java.lang.String toString()
toString
in class Value.Structured
public void appendSB(java.lang.StringBuffer sb)
public boolean ni(Value v)
public boolean contains(Type t)
public static Type.Tuple tuple(int k)
public static java.lang.String show(Value v)
public static java.lang.String show(Value[] vs)
show(Value)
several Values.public static void main(java.lang.String[] argv)