mud.common
Class Utils
java.lang.Object
mud.common.Utils
public abstract class Utils
- extends java.lang.Object
Collection of useful convertion functions.
- Author:
- Tamar Christina
Constructor Summary |
Utils()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Utils
public Utils()
createFixedLengthCharArray
public static char[] createFixedLengthCharArray(java.lang.String input,
int length)
- Creates a fixed length array
- Parameters:
input
- String to convertlength
- 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)