com.steptools.stdev
Class Primitives

java.lang.Object
  extended by com.steptools.stdev.Primitives

public class Primitives
extends java.lang.Object

Constants to represent the domains and unset values of EXPRESS primitives.


Field Summary
static PrimitiveDomain BOOLEAN
          Domain for EXPRESS BOOLEAN type
static PrimitiveDomain INTEGER
          Domain for EXPRESS INTEGER type
static PrimitiveDomain LOGICAL
          Domain for EXPRESS LOGICAL type
static ExpBoolean NULL_BOOLEAN
          Represents an unset value of type BOOLEAN
static int NULL_INTEGER
          Represents an unset value of type INTEGER
static Logical NULL_LOGICAL
          Represents an unset value of type LOGICAL
static double NULL_REAL
          Represents an unset value of type REAL
static java.lang.String NULL_STRING
          Represents an unset value of type STRING
static PrimitiveDomain REAL
          Domain for EXPRESS REAL type
static PrimitiveDomain STRING
          Domain for EXPRESS STRING type
 
Method Summary
static PrimitiveDomain findDomain(java.lang.Class cls)
          Finds a Domain for a primitive corresponding to a class
static boolean isNull(double val)
          Determines if the specified value is a null value.
static boolean isNull(int val)
          Determines if the specified value is a null value.
static boolean isNull(java.lang.Object val)
          Determines if the specified value is a null value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOOLEAN

public static final PrimitiveDomain BOOLEAN
Domain for EXPRESS BOOLEAN type


NULL_BOOLEAN

public static final ExpBoolean NULL_BOOLEAN
Represents an unset value of type BOOLEAN


STRING

public static final PrimitiveDomain STRING
Domain for EXPRESS STRING type


NULL_STRING

public static final java.lang.String NULL_STRING
Represents an unset value of type STRING


REAL

public static final PrimitiveDomain REAL
Domain for EXPRESS REAL type


NULL_REAL

public static final double NULL_REAL
Represents an unset value of type REAL

See Also:
Constant Field Values

INTEGER

public static final PrimitiveDomain INTEGER
Domain for EXPRESS INTEGER type


NULL_INTEGER

public static final int NULL_INTEGER
Represents an unset value of type INTEGER

See Also:
Constant Field Values

LOGICAL

public static final PrimitiveDomain LOGICAL
Domain for EXPRESS LOGICAL type


NULL_LOGICAL

public static final Logical NULL_LOGICAL
Represents an unset value of type LOGICAL

Method Detail

findDomain

public static PrimitiveDomain findDomain(java.lang.Class cls)
                                  throws DomainNotFoundException
Finds a Domain for a primitive corresponding to a class

Parameters:
cls - The class to get the domain for.
Throws:
DomainNotFoundException

isNull

public static boolean isNull(java.lang.Object val)
Determines if the specified value is a null value. For most types, this is simply done by looking if val==null. For integers and real values, we have a wrapper, which may itself contain a null value

Returns:
true if the value is null/unset, false otherwise.

isNull

public static boolean isNull(int val)
Determines if the specified value is a null value.

Returns:
true if the value is null/unset, false otherwise.

isNull

public static boolean isNull(double val)
Determines if the specified value is a null value.

Returns:
true if the value is null/unset, false otherwise.