scale.clef.expr
Enum CastMode

java.lang.Object
  extended by java.lang.Enum<CastMode>
      extended by scale.clef.expr.CastMode
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<CastMode>

public enum CastMode
extends java.lang.Enum<CastMode>

This enum specifies the type conversion - address cast, real, etc.

$Id$

Copyright 2008 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.


Enum Constant Summary
CAST
          Cast an address to the specified type.
CEILING
          Return the next higher integer value.
FLOOR
          Return the next lower integer value.
IMAGINARY
          Return the imaginary part.
INVALID
          No valid cast.
NONE
          No cast needed.
REAL
          Return the real value part.
ROUND
          Return the nearest integer value.
TRUNCATE
          Return the integer part of the value.
 
Method Summary
 java.lang.String toString()
           
static CastMode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static CastMode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NONE

public static final CastMode NONE
No cast needed.


CAST

public static final CastMode CAST
Cast an address to the specified type.


REAL

public static final CastMode REAL
Return the real value part.


IMAGINARY

public static final CastMode IMAGINARY
Return the imaginary part. Returns 0 for everything except a complex value.


FLOOR

public static final CastMode FLOOR
Return the next lower integer value. This is the same computation as the Fortran AINT() function.


CEILING

public static final CastMode CEILING
Return the next higher integer value.


ROUND

public static final CastMode ROUND
Return the nearest integer value. This is the same computation as the Fortran ANINT() function.


TRUNCATE

public static final CastMode TRUNCATE
Return the integer part of the value.


INVALID

public static final CastMode INVALID
No valid cast.

Method Detail

values

public static CastMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (CastMode c : CastMode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static CastMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<CastMode>