mark.core.test
Class Util

java.lang.Object
  |
  +--mark.core.test.Util

public class Util
extends java.lang.Object

Util is a class that contains a number of simple static utility methods.


Constructor Summary
Util()
           
 
Method Summary
static boolean equals(java.lang.Object a, java.lang.Object b)
          A generalized equals method.
static void test(java.lang.String name, boolean success)
          Prints to standard error the given string, a bunch of dots, "Success!" or "Failure!", depending on the given boolean, and a newline.
static java.lang.String toString(java.lang.Object obj)
          A generalized toString method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

test

public static void test(java.lang.String name,
                        boolean success)
Prints to standard error the given string, a bunch of dots, "Success!" or "Failure!", depending on the given boolean, and a newline. Formats the line so that it is 75 characters long.

Parameters:
name - the String.
success - whether to print success.

toString

public static java.lang.String toString(java.lang.Object obj)
A generalized toString method. Will work on any object, so long as the objects components have legitimate toString methods. Copied from Core Java 2 Volume 1 page 214.

Returns:
the object as a string.

equals

public static boolean equals(java.lang.Object a,
                             java.lang.Object b)
A generalized equals method. Will work on any two objects, so long as the objects components have legitimate equals methods. Copied from Core Java 2 Volume 1 page 214.

Returns:
the object as a string.