tuffy.mln
Class Type

java.lang.Object
  extended by tuffy.mln.Type

public class Type
extends java.lang.Object

A domain/type of constants; i.e., a subset of constants.


Field Summary
static Type Bool
           
static Type Float
           
static Type Generic
          Built-in types
static Type Integer
           
 java.lang.String name
          Name of this Type.
static Type String
           
 
Constructor Summary
Type(java.lang.String name)
          Constructor of Type.
 
Method Summary
 void addConstant(int con)
          Add a constant to this type.
 boolean contains(int x)
          Return true if this type contains the constant x
 Type getNonSymbolicType()
           
 java.lang.String getNonSymbolicTypeInSQL()
           
 java.lang.String getRelName()
          Return the name of the DB relational table of this type.
 boolean isNonSymbolicType()
          See if this type is non-symbolic.
 java.lang.String name()
          Return the name of this type.
 int size()
          Return the number of constants in this type domain.
 void storeConstantList(RDB db)
          Store the list of constants in a DB table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Bool

public static Type Bool

Float

public static Type Float

Generic

public static Type Generic
Built-in types


Integer

public static Type Integer

name

public java.lang.String name
Name of this Type.


String

public static Type String
Constructor Detail

Type

public Type(java.lang.String name)
Constructor of Type.

Parameters:
name - the name of this new type; it must be unique among all types
Method Detail

addConstant

public void addConstant(int con)
Add a constant to this type.

Parameters:
con - the constant to be added

contains

public boolean contains(int x)
Return true if this type contains the constant x


getNonSymbolicType

public Type getNonSymbolicType()

getNonSymbolicTypeInSQL

public java.lang.String getNonSymbolicTypeInSQL()

getRelName

public java.lang.String getRelName()
Return the name of the DB relational table of this type.


isNonSymbolicType

public boolean isNonSymbolicType()
See if this type is non-symbolic. "Non-symbolic" means that the value of this type is directly stored in the predicate table, whereas values of a "symbolic" (default) type are represented by unique IDs as per the symbol table.

Returns:

name

public java.lang.String name()
Return the name of this type.


size

public int size()
Return the number of constants in this type domain.


storeConstantList

public void storeConstantList(RDB db)
Store the list of constants in a DB table.

Parameters:
db -