public abstract static class Utils.GeneralUtils
extends java.lang.Object
| Constructor and Description |
|---|
GeneralUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
colorRGBAToInt(float r,
float g,
float b,
float a)
Converts a color (RGBA) to int.
|
static java.lang.String |
getFormattedTimeAndDate(long timeInMillis) |
static long |
getUnixTimestamp() |
static float |
intToColorA(int color)
Converts an int value into an RGBA color and returns the alpha value.
|
static float |
intToColorB(int color)
Converts an int value into an RGBA color and returns the blue color
value.
|
static float |
intToColorG(int color)
Converts an int value into an RGBA color and returns the green color
value.
|
static float |
intToColorR(int color)
Converts an int value into an RGBA color and returns the red color
value.
|
static int |
nextRandomColor(boolean alpha) |
public static int colorRGBAToInt(float r,
float g,
float b,
float a)
r - the red value (0-1)g - the green value (0-1)b - the blue value (0-1)a - the alpha value (0-1)public static float intToColorR(int color)
color - the int color value.public static float intToColorG(int color)
color - the int color value.public static float intToColorB(int color)
color - the int color value.public static float intToColorA(int color)
color - the int color value.public static int nextRandomColor(boolean alpha)
public static java.lang.String getFormattedTimeAndDate(long timeInMillis)
public static long getUnixTimestamp()