public class JavaUtil
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
JavaUtil.AtMode |
static class |
JavaUtil.SortDirection |
static class |
JavaUtil.SortType |
static class |
JavaUtil.TrimMode |
Constructor and Description |
---|
JavaUtil() |
Modifier and Type | Method and Description |
---|---|
static int |
ahsvToColor(int alpha,
float hue,
float saturation,
float value) |
static double |
averageOfList(java.util.List list) |
static float |
colorToHue(int color) |
static float |
colorToSaturation(int color) |
static float |
colorToValue(int color) |
static java.util.List |
createListWith(java.lang.Object... elements) |
static java.util.List |
createListWithItemRepeated(java.lang.Object element,
int n) |
static java.lang.String |
formatNumber(double number,
int precision) |
static int |
hsvToColor(float hue,
float saturation,
float value) |
static java.lang.Object |
inListGet(java.util.List list,
JavaUtil.AtMode atMode,
int i,
boolean remove) |
static java.util.List |
inListGetSublist(java.util.List list,
JavaUtil.AtMode atMode1,
int i1,
JavaUtil.AtMode atMode2,
int i2) |
static void |
inListSet(java.util.List list,
JavaUtil.AtMode atMode,
int i,
boolean insert,
java.lang.Object value) |
static java.lang.String |
inTextGetLetter(java.lang.String str,
JavaUtil.AtMode atMode,
int i) |
static java.lang.String |
inTextGetSubstring(java.lang.String str,
JavaUtil.AtMode atMode1,
int i1,
JavaUtil.AtMode atMode2,
int i2) |
static boolean |
isPrime(double d) |
static java.util.List |
makeListFromText(java.lang.String text,
java.lang.String delimiter) |
static java.lang.String |
makeTextFromList(java.util.List list,
java.lang.String delimiter) |
static double |
maxOfList(java.util.List list) |
static double |
medianOfList(java.util.List list) |
static double |
minOfList(java.util.List list) |
static java.util.List |
modesOfList(java.util.List list) |
static int |
randomInt(double a,
double b) |
static java.lang.Object |
randomItemOfList(java.util.List list) |
static java.util.List |
sort(java.util.List list,
JavaUtil.SortType sortType,
JavaUtil.SortDirection sortDirection) |
static double |
standardDeviationOfList(java.util.List list) |
static double |
sumOfList(java.util.List list) |
static java.lang.String |
textTrim(java.lang.String str,
JavaUtil.TrimMode trimMode) |
static java.lang.String |
toTitleCase(java.lang.String str) |
public static java.lang.String inTextGetLetter(java.lang.String str, JavaUtil.AtMode atMode, int i)
public static java.lang.String inTextGetSubstring(java.lang.String str, JavaUtil.AtMode atMode1, int i1, JavaUtil.AtMode atMode2, int i2)
public static java.lang.String toTitleCase(java.lang.String str)
public static java.lang.String textTrim(java.lang.String str, JavaUtil.TrimMode trimMode)
public static java.lang.String formatNumber(double number, int precision)
public static boolean isPrime(double d)
public static double sumOfList(java.util.List list)
public static double minOfList(java.util.List list)
public static double maxOfList(java.util.List list)
public static double averageOfList(java.util.List list)
public static double medianOfList(java.util.List list)
public static java.util.List modesOfList(java.util.List list)
public static double standardDeviationOfList(java.util.List list)
public static java.lang.Object randomItemOfList(java.util.List list)
public static int randomInt(double a, double b)
public static java.util.List createListWith(java.lang.Object... elements)
public static java.util.List createListWithItemRepeated(java.lang.Object element, int n)
public static java.lang.Object inListGet(java.util.List list, JavaUtil.AtMode atMode, int i, boolean remove)
public static void inListSet(java.util.List list, JavaUtil.AtMode atMode, int i, boolean insert, java.lang.Object value)
public static java.util.List inListGetSublist(java.util.List list, JavaUtil.AtMode atMode1, int i1, JavaUtil.AtMode atMode2, int i2)
public static java.util.List sort(java.util.List list, JavaUtil.SortType sortType, JavaUtil.SortDirection sortDirection)
public static java.lang.String makeTextFromList(java.util.List list, java.lang.String delimiter)
public static java.util.List makeListFromText(java.lang.String text, java.lang.String delimiter)
public static float colorToHue(int color)
public static float colorToSaturation(int color)
public static float colorToValue(int color)
public static int hsvToColor(float hue, float saturation, float value)
public static int ahsvToColor(int alpha, float hue, float saturation, float value)