mud.common
Class Utils

java.lang.Object
  extended by mud.common.Utils

public abstract class Utils
extends java.lang.Object

Collection of useful convertion functions.

Author:
Tamar Christina

Constructor Summary
Utils()
           
 
Method Summary
static char[] createFixedLengthCharArray(java.lang.String input, int length)
          Creates a fixed length array
static int getDeltaX(Direction dir, int dist)
           
static int getDeltaY(Direction dir, int dist)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

createFixedLengthCharArray

public static char[] createFixedLengthCharArray(java.lang.String input,
                                                int length)
Creates a fixed length array

Parameters:
input - String to convert
length - The required length of the resulting Char array
Returns:
Fixed length char array
Throws:
java.lang.IllegalArgumentException - If the specified Input string is larger than the buffer to be created.

getDeltaX

public static int getDeltaX(Direction dir,
                            int dist)

getDeltaY

public static int getDeltaY(Direction dir,
                            int dist)