public class InternalUtils extends Object
| Constructor and Description |
|---|
InternalUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> Class<T> |
classForName(String className) |
static <T> Class<T> |
classForName(String className,
boolean ignoreException) |
static String |
hexDump(int columns,
byte[] raw,
int offset,
int length) |
static void |
linkFutures(CompletableFuture source,
CompletableFuture target) |
static void |
linkFuturesOnError(CompletableFuture source,
CompletableFuture target) |
static <K,V> V |
putIfAbsentAndGet(ConcurrentMap<K,V> map,
K key,
V newValue)
If the specified key is not already associated
with a value, associate it with the given value.
|
static <R> Task<R> |
safeInvoke(Supplier<Task<R>> supplier) |
static void |
sleep(long millis)
Invokes Thread.sleep().
|
public static void sleep(long millis)
millis - public static void linkFutures(CompletableFuture source, CompletableFuture target)
public static void linkFuturesOnError(CompletableFuture source, CompletableFuture target)
public static <K,V> V putIfAbsentAndGet(ConcurrentMap<K,V> map, K key, V newValue)
if (!map.containsKey(key)) {
map.put(key, value);
return value;
} else {
return map.get(key);
}
except that the action is performed atomically.public static String hexDump(int columns, byte[] raw, int offset, int length)
Copyright © 2019 Electronic Arts Inc. All rights reserved.