Package org.ngengine.platform
Class NGEUtils
java.lang.Object
org.ngengine.platform.NGEUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
allZeroes
(byte[] bytes) static <T> T
awaitNoThrow
(AsyncTask<T> task) static String
bytesToHex
(byte[] bbf) static String
bytesToHex
(ByteBuffer bbf) static String
censorSpecial
(String appName) static boolean
Wrapper to exploit assert to toggle on/off debug code usage: assert dbg(()->{ // heavy debug code });static boolean
static boolean
static NGEPlatform
static byte[]
static ByteBuffer
hexToBytes
(String s) static boolean
static Collection
<String[]> static int
safeIntList
(Object tags) static long
Convert an input object to a longstatic Instant
safeSecondsInstant
(Object object) static String
safeString
(Object input) static String[]
safeStringArray
(Object tags) safeStringList
(Object tags) static void
setPlatform
(NGEPlatform platform)
-
Constructor Details
-
NGEUtils
public NGEUtils()
-
-
Method Details
-
setPlatform
-
getPlatform
-
bytesToHex
-
bytesToHex
-
hexToBytes
-
hexToByteArray
-
allZeroes
public static boolean allZeroes(byte[] bytes) -
safeLong
Convert an input object to a long- Parameters:
input
-- Returns:
-
safeInt
-
safeString
-
safeStringArray
-
safeStringList
-
safeIntList
-
safeCollectionOfStringArray
-
safeBool
-
safeSecondsInstant
-
dbg
Wrapper to exploit assert to toggle on/off debug code usage: assert dbg(()->{ // heavy debug code }); -
equalsIgnoreOrder
-
equalsWithOrder
-
awaitNoThrow
-
censorSpecial
-