UTJML

edu.utep.cs.utjml.tgen
Class Value

java.lang.Object
  extended by edu.utep.cs.utjml.tgen.Value
All Implemented Interfaces:
Denotable
Direct Known Subclasses:
BooleanValue, IntValue

public abstract class Value
extends Object
implements Denotable

An abstract class to denote various values.

Version:
$Revision: 1.7 $
Author:
Yoonsik Cheon

Field Summary
protected  Object value
          The value of this object.
 
Constructor Summary
protected Value(Object value)
          Creates a new value.
 
Method Summary
static BooleanValue booleanValue(boolean val)
          Creates a boolean value.
static edu.utep.cs.utjml.tgen.Value.ByteValue byteValue(byte val)
          Creates a byte value.
static edu.utep.cs.utjml.tgen.Value.CharValue charValue(char val)
          Creates a char value.
static edu.utep.cs.utjml.tgen.Value.DoubleValue doubleValue(double val)
          Creates a double value.
static edu.utep.cs.utjml.tgen.Value.FloatValue floatValue(float val)
          Creates a float value.
static IntValue intValue(int val)
          Creates an int value.
static edu.utep.cs.utjml.tgen.Value.LongValue longValue(long val)
          Creates a long value.
static edu.utep.cs.utjml.tgen.Value.NullValue nullValue(Class type)
          Creates a null valu of given type.
static edu.utep.cs.utjml.tgen.Value.ShortValue shortValue(short val)
          Creates a short value.
static edu.utep.cs.utjml.tgen.Value.StringValue stringValue(String val)
          Creates a string value.
 String toString()
          Returns the string representation of this value.
abstract  Class type()
          Returns the type of this value.
 Object value()
          Returns the value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

protected Object value
The value of this object.

Constructor Detail

Value

protected Value(Object value)
Creates a new value.

Method Detail

type

public abstract Class type()
Returns the type of this value.

Specified by:
type in interface Denotable

value

public Object value()
Returns the value.

Specified by:
value in interface Denotable

toString

public String toString()
Returns the string representation of this value.

Specified by:
toString in interface Denotable
Overrides:
toString in class Object

booleanValue

public static BooleanValue booleanValue(boolean val)
Creates a boolean value.


byteValue

public static edu.utep.cs.utjml.tgen.Value.ByteValue byteValue(byte val)
Creates a byte value.


shortValue

public static edu.utep.cs.utjml.tgen.Value.ShortValue shortValue(short val)
Creates a short value.


intValue

public static IntValue intValue(int val)
Creates an int value.


longValue

public static edu.utep.cs.utjml.tgen.Value.LongValue longValue(long val)
Creates a long value.


charValue

public static edu.utep.cs.utjml.tgen.Value.CharValue charValue(char val)
Creates a char value.


floatValue

public static edu.utep.cs.utjml.tgen.Value.FloatValue floatValue(float val)
Creates a float value.


doubleValue

public static edu.utep.cs.utjml.tgen.Value.DoubleValue doubleValue(double val)
Creates a double value.


stringValue

public static edu.utep.cs.utjml.tgen.Value.StringValue stringValue(String val)
Creates a string value.


nullValue

public static edu.utep.cs.utjml.tgen.Value.NullValue nullValue(Class type)
Creates a null valu of given type.


UTJML

UTJML is Copyright (C) 2004-2006 by University of Texas at El Paso and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the JML project.