blog
Class BuiltInTypes

java.lang.Object
  extended by blog.BuiltInTypes

public class BuiltInTypes
extends java.lang.Object

Class with static methods and variables for dealing with the built-in types that exist in every BLOG model. These include Boolean, Real, Integer, NaturalNum, String, Character and types RmxnMatrix and RnVector for positive integers m, n.


Field Summary
static Type BOOLEAN
          Type for the Boolean values "true" and "false".
static Type BUILT_IN
          Supertype for all built-in types.
static Type CHARACTER
          Type for individual unicode characters.
static Type INTEGER
          Type for integers.
static Type NATURAL_NUM
          Type for natural numbers.
static Type NULL
          Type for the built-in constant "null".
static Type REAL
          Type for real numbers.
static Type RMATRIX
          Supertype for real matrices.
static Type RVECTOR
          Supertype for real vectors, which are matrices with one column.
static Type STRING
          Type for finite strings of Unicode characters.
static Type TIMESTEP
          Type for timesteps.
 
Method Summary
static boolean exists(java.lang.String name)
          Returns true if there is a built-in type with the given name.
static Type getType(java.lang.String name)
          Returns the built-in type with the given name, or null if there is no such built-in type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUILT_IN

public static final Type BUILT_IN
Supertype for all built-in types. Used to determine whether a type is built in or not.


NULL

public static final Type NULL
Type for the built-in constant "null". A term of any type except BOOLEAN can have the same denotation as "null", so we treat this special type as being a subtype of every type except BOOLEAN.


BOOLEAN

public static final Type BOOLEAN
Type for the Boolean values "true" and "false". Objects of this type are represented as java.lang.Boolean objects.


RMATRIX

public static final Type RMATRIX
Supertype for real matrices. Specific matrix types have names of the form RmxnMatrix for non-zero integers m and n; those types are created lazily as needed. Names of the form Rmx1Matrix are aliases for RmVector.

Objects of this type are represented as Jama.Matrix objects.


RVECTOR

public static final Type RVECTOR
Supertype for real vectors, which are matrices with one column. Specific vector types have names of the form RnVector; those types are created lazily as needed.

Objects of this type are represented as Jama.Matrix objects.


REAL

public static final Type REAL
Type for real numbers. Objects of this type are represented as java.lang.Number objects.


INTEGER

public static final Type INTEGER
Type for integers. This is a subtype of the real numbers. Objects of this type are represented as java.lang.Integer objects.


NATURAL_NUM

public static final Type NATURAL_NUM
Type for natural numbers. This is a subtype of the integers. Objects of this type are represented as java.lang.Integer objects.


STRING

public static final Type STRING
Type for finite strings of Unicode characters. Objects of this type are represented as java.lang.String objects.


CHARACTER

public static final Type CHARACTER
Type for individual unicode characters. Objects of this type are represented as java.lang.Character objects.


TIMESTEP

public static Type TIMESTEP
Type for timesteps. Objects of this type are represented as Timestep objects, which extend Number (but not Integer, because Integer is final).

Method Detail

getType

public static Type getType(java.lang.String name)
Returns the built-in type with the given name, or null if there is no such built-in type.


exists

public static boolean exists(java.lang.String name)
Returns true if there is a built-in type with the given name.