Package org.kobe.xbot.Utilities
Class Utilities
java.lang.Object
org.kobe.xbot.Utilities.Utilities
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <K,
V> ConcurrentHashMap<K, V> combineConcurrentHashMaps
(ConcurrentHashMap<K, V>... maps) static <E extends Enum<E>>
booleanstatic byte[]
generateRandomBytes
(int length) static InetAddress
static String
static int
Measures how many times a simple while loop can execute in one second.static String[]
static boolean
validateKey
(String key, boolean throwError) static boolean
validateName
(String name, boolean throwError) static void
-
Constructor Details
-
Utilities
public Utilities()
-
-
Method Details
-
getLocalIPAddress
-
getLocalInetAddress
-
contains
-
tokenize
-
combineConcurrentHashMaps
@SafeVarargs public static <K,V> ConcurrentHashMap<K,V> combineConcurrentHashMaps(ConcurrentHashMap<K, V>... maps) -
validateKey
-
validateName
-
measureWhileLoopIterationsPerSecond
public static int measureWhileLoopIterationsPerSecond()Measures how many times a simple while loop can execute in one second.- Returns:
- the number of iterations the while loop can execute in one second
-
generateRandomBytes
public static byte[] generateRandomBytes(int length) -
warmupProtobuf
public static void warmupProtobuf()
-