|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.indiana.util.Utility
public abstract class Utility
Contains some useful standard static functions.
Nested Class Summary | |
---|---|
static class |
Utility.CurrentStackTrace
|
Constructor Summary | |
---|---|
Utility()
Creates new Utility |
Method Summary | |
---|---|
static java.lang.String |
doubleArrayToString(double[] a)
Convert an array of doubles to a String representation. |
static void |
fatalError(java.lang.String msg)
Signal a fatal error, and exit the program. |
static int[] |
fillIntArray(int[] a,
int from,
int to,
int startVal,
int step)
Including from, excluding to. |
static java.lang.String |
getPartialStackHistory(int historySize)
|
static java.lang.String |
getPartialStackHistory(int historyStart,
int historyStop)
|
static java.lang.String |
getStackTrace()
|
static double |
inputDouble()
Input a double from the keyboard. |
static java.lang.String |
inputString()
Input a String from the keyboard. |
static java.util.ArrayList |
intArrayToIntegerArrayList(int[] a)
Convert an array of ints into a ArrayList of Integer objects. |
static java.lang.String |
intArrayToString(int[] a)
Convert an array of doubles to a String representation. |
static double |
logBase(double value,
double base)
Calculate the log of a value to a given base |
static java.lang.Object[] |
makeSubArray(java.lang.Object[] a,
int from,
int to)
including from, excluding to |
static java.util.ArrayList |
makeSubArrayList(java.util.ArrayList originalList,
int from,
int to)
including from, excluding to |
static double[] |
makeSubDoubleArray(double[] a,
int from,
int to)
including from, excluding to |
static int[] |
makeSubIntArray(int[] a,
int from,
int to)
including from, excluding to |
static java.lang.String |
objectArrayToString(java.lang.Object[] a)
Convert an array of objects into a single String representation. |
static void |
printStackTrace()
Print the stack trace for the current execution position in the program. |
static java.lang.String |
stringToHTMLLines(java.lang.String str,
int lineWidth)
|
static void |
warning(java.lang.String msg)
Signal a warning, and all the program to continue. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Utility()
Method Detail |
---|
public static java.lang.String stringToHTMLLines(java.lang.String str, int lineWidth)
public static double logBase(double value, double base)
value
- The value of which to take the log.base
- The base of the log.public static final void fatalError(java.lang.String msg)
public static final void warning(java.lang.String msg)
public static final void printStackTrace()
public static final java.lang.String getStackTrace()
public static final java.lang.String getPartialStackHistory(int historySize)
public static final java.lang.String getPartialStackHistory(int historyStart, int historyStop)
public static final java.lang.String doubleArrayToString(double[] a)
public static final java.lang.String intArrayToString(int[] a)
public static java.util.ArrayList intArrayToIntegerArrayList(int[] a)
public static java.lang.String objectArrayToString(java.lang.Object[] a)
public static int[] makeSubIntArray(int[] a, int from, int to)
public static double[] makeSubDoubleArray(double[] a, int from, int to)
public static java.lang.Object[] makeSubArray(java.lang.Object[] a, int from, int to)
public static java.util.ArrayList makeSubArrayList(java.util.ArrayList originalList, int from, int to)
public static int[] fillIntArray(int[] a, int from, int to, int startVal, int step)
a
- int[]from
- intto
- int
public static java.lang.String inputString()
public static double inputDouble()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |