apputil
Class util
java.lang.Object
|
+--apputil.util
- public class util
- extends java.lang.Object
This class provides commonly used utility methods throughout the application.
Constructor Summary |
util()
|
Method Summary |
static long |
DateStringToLong(java.lang.String d)
converts a date string to a long value. |
static int |
getPosInArray(java.lang.String[] theArray,
java.lang.String theString)
Finds the position of a String within a String array. |
static java.lang.String |
LongToDateString(long d)
converts a long value into a date expression in the form dd-MMM-yyyy. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
util
public util()
DateStringToLong
public static long DateStringToLong(java.lang.String d)
throws java.text.ParseException
- converts a date string to a long value. The long value is defined by
the java.util.Date class, as returned by the getTime method.
LongToDateString
public static java.lang.String LongToDateString(long d)
- converts a long value into a date expression in the form dd-MMM-yyyy.
getPosInArray
public static int getPosInArray(java.lang.String[] theArray,
java.lang.String theString)
throws java.lang.ArrayIndexOutOfBoundsException
- Finds the position of a String within a String array.
- Parameters:
theArray
- the string array to searchtheString
- the string to find in the array- Throws:
- ArrayIndexOutOfBounds - thrown if the string cannot be found in the array