roast
Class ValueType

java.lang.Object
  |
  +--roast.ValueType

public class ValueType
extends java.lang.Object

Overview

Comparison and printing functions.

Interface Semantics

state variables
none
state invariant
none
assumptions
none


Constructor Summary
ValueType()
           
 
Method Summary
static boolean compareValue(boolean actVal, boolean expVal)
          Returns true if the two specified booleans are equal to one another.
static boolean compareValue(byte actVal, byte expVal)
          Returns true if the two specified bytes are equal to one another.
static boolean compareValue(char actVal, char expVal)
          Returns true if the two specified characters are equal to one another.
static boolean compareValue(double actVal, double expVal)
          Returns true if the two specified doubles are equal to one another.
static boolean compareValue(float actVal, float expVal)
          Returns true if the two specified floats are equal to one another.
static boolean compareValue(int actVal, int expVal)
          Returns true if the two specified ints are equal to one another.
static boolean compareValue(long actVal, long expVal)
          Returns true if the two specified longs are equal to one another.
static boolean compareValue(java.lang.Object actVal, java.lang.Object expVal)
          Returns true if the two specified objects are equal to one another, that is, they represent the same object.
static boolean compareValue(short actVal, short expVal)
           
static boolean compareValue(java.lang.String actVal, java.lang.String expVal)
          Returns true if the two specified strings are equal to one another, that is, they represent the same sequence of characters.
static void printValue(int lineNumber, boolean actVal, boolean expVal)
           
static void printValue(int lineNumber, byte actVal, byte expVal)
           
static void printValue(int lineNumber, char actVal, char expVal)
           
static void printValue(int lineNumber, double actVal, double expVal)
           
static void printValue(int lineNumber, float actVal, float expVal)
           
static void printValue(int lineNumber, int actVal, int expVal)
           
static void printValue(int lineNumber, long actVal, long expVal)
           
static void printValue(int lineNumber, java.lang.Object actVal, java.lang.Object expVal)
           
static void printValue(int lineNumber, short actVal, short expVal)
          Returns true if the two specified shorts are equal to one another.
static void printValue(int lineNumber, java.lang.String actVal, java.lang.String expVal)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueType

public ValueType()
Method Detail

compareValue

public static boolean compareValue(java.lang.Object actVal,
                                   java.lang.Object expVal)
Returns true if the two specified objects are equal to one another, that is, they represent the same object.

Returns:
true if the objects are equal
false otherwise

printValue

public static void printValue(int lineNumber,
                              java.lang.Object actVal,
                              java.lang.Object expVal)

compareValue

public static boolean compareValue(java.lang.String actVal,
                                   java.lang.String expVal)
Returns true if the two specified strings are equal to one another, that is, they represent the same sequence of characters.

Returns:
true if the strings are equal
false otherwise

printValue

public static void printValue(int lineNumber,
                              java.lang.String actVal,
                              java.lang.String expVal)

compareValue

public static boolean compareValue(boolean actVal,
                                   boolean expVal)
Returns true if the two specified booleans are equal to one another.

Returns:
true if the booleans are equal
false otherwise

printValue

public static void printValue(int lineNumber,
                              boolean actVal,
                              boolean expVal)

compareValue

public static boolean compareValue(byte actVal,
                                   byte expVal)
Returns true if the two specified bytes are equal to one another.

Returns:
true if the bytes are equal
false otherwise

printValue

public static void printValue(int lineNumber,
                              byte actVal,
                              byte expVal)

compareValue

public static boolean compareValue(char actVal,
                                   char expVal)
Returns true if the two specified characters are equal to one another.

Returns:
true if the characters are equal
false otherwise

printValue

public static void printValue(int lineNumber,
                              char actVal,
                              char expVal)

compareValue

public static boolean compareValue(double actVal,
                                   double expVal)
Returns true if the two specified doubles are equal to one another. Two doubles d1 and d2 are considered equal if:
                               new Double(d1).equals(new Double(d2))
 
Unlike the == operator, this method considers NaN equal to itself, and 0.0d unequal to -0.0d.

Returns:
true if the doubles are equal
false otherwise

printValue

public static void printValue(int lineNumber,
                              double actVal,
                              double expVal)

compareValue

public static boolean compareValue(float actVal,
                                   float expVal)
Returns true if the two specified floats are equal to one another. Two floats f1 and f2 are considered equal if:
                               new Float(d1).equals(new Float(d2))
 
Unlike the == operator, this method considers NaN equal to itself, and 0.0f unequal to -0.0f.

Returns:
true if the floats are equal
false otherwise

printValue

public static void printValue(int lineNumber,
                              float actVal,
                              float expVal)

compareValue

public static boolean compareValue(int actVal,
                                   int expVal)
Returns true if the two specified ints are equal to one another.

Returns:
true if the ints are equal
false otherwise

printValue

public static void printValue(int lineNumber,
                              int actVal,
                              int expVal)

compareValue

public static boolean compareValue(long actVal,
                                   long expVal)
Returns true if the two specified longs are equal to one another.

Returns:
true if the longs are equal
false otherwise

printValue

public static void printValue(int lineNumber,
                              long actVal,
                              long expVal)

compareValue

public static boolean compareValue(short actVal,
                                   short expVal)

printValue

public static void printValue(int lineNumber,
                              short actVal,
                              short expVal)
Returns true if the two specified shorts are equal to one another.

Returns:
true if the shorts are equal
false otherwise