|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jogre.common.util.JogreUtils
Bunch of utilities which are used in several classes through the API.
| Constructor Summary | |
JogreUtils()
|
|
| Method Summary | |
static int[] |
convertTo1DArray(int[][] array)
Helper method for converting a 2 dimensional array to a single array. |
static int[][] |
convertTo2DArray(int[] array,
int l1,
int l2)
Helper method for converting a 2 dimensional array to a single array. |
static boolean[] |
convertToBoolArray(String text)
Convert String to boolean array. |
static int[] |
convertToIntArray(String text)
Convert String to int array. |
static String[] |
convertToStringArray(String text)
Convert String to int array. |
static Color |
getColorDelta(Color color,
int delta)
Return a new Color from an existing color by add each of its rgb values with an integer delta amount. |
static Color |
getColour(String colourStr)
Return a Color object from a String of "r,g,b" |
static int |
invert(int value)
Get invert of 0 or 1. |
static Date |
readDate(String dateString,
String formatString)
Little helper method which reads as a String and formats it using a specified format String. |
static String |
valueOf(boolean[] values)
Convert simple boolean array to space delimited String. |
static String |
valueOf(Date date,
String formatString)
Return the data as a String formatted with a specified String. |
static String |
valueOf(int[] values)
Convert simple integer array to space delimited String. |
static String |
valueOf(String[] values)
Convert simple String array to space delimited String. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JogreUtils()
| Method Detail |
public static Color getColour(String colourStr)
colourStr - Colour as a comma delimited String.
public static Color getColorDelta(Color color,
int delta)
color - Original Colour.delta - Amount to add color to each channel.
public static Date readDate(String dateString,
String formatString)
dateString - Date as a StringformatString - Format of the String
SimpleDateFormatpublic static String[] convertToStringArray(String text)
text - Simple integer array as a spaced delimited String.public static int[] convertToIntArray(String text)
text - Simple integer array as a spaced delimited String.public static boolean[] convertToBoolArray(String text)
text - Simple integer array as a spaced delimited String.
public static int[] convertTo1DArray(int[][] array)
array - 2 dimensional array.
public static int[][] convertTo2DArray(int[] array,
int l1,
int l2)
array - Single dimension array of data.l1 - Length 1.l2 - Length 2
public static String valueOf(int[] values)
values - Array of integers.
public static String valueOf(boolean[] values)
values - Array of integers.
public static String valueOf(String[] values)
values - Array of strings.
public static String valueOf(Date date,
String formatString)
date - Specified data / time.formatString - Format of string.
public static int invert(int value)
value -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||