public class Utils extends Object
Constructor and Description |
---|
Utils() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
checkNotNull(T ref,
String message) |
static String |
convertSystemPropertyNameToEnvVar(String systemPropertyName) |
static String |
getEnvVar(String envVarName,
String defaultValue) |
static String |
getProperty(Map<String,Object> properties,
String propertyName) |
static String |
getProperty(Map<String,Object> properties,
String propertyName,
String defaultValue) |
static String |
getSystemPropertyOrEnvVar(String systemPropertyName) |
static Boolean |
getSystemPropertyOrEnvVar(String systemPropertyName,
Boolean defaultValue) |
static int |
getSystemPropertyOrEnvVar(String systemPropertyName,
int defaultValue) |
static String |
getSystemPropertyOrEnvVar(String systemPropertyName,
String defaultValue) |
static String |
getSystemPropertyOrEnvVar(String systemPropertyName,
String envVarName,
String defaultValue) |
static boolean |
isNotNullOrEmpty(String str) |
static boolean |
isNullOrEmpty(String str) |
static String |
join(Object[] array) |
static String |
join(Object[] array,
char separator) |
static boolean |
waitUntilReady(BlockingQueue<Object> queue,
long amount,
TimeUnit timeUnit)
Wait until an other thread signals the completion of a task.
|
public static <T> T checkNotNull(T ref, String message)
public static boolean isNullOrEmpty(String str)
public static boolean isNotNullOrEmpty(String str)
public static String getProperty(Map<String,Object> properties, String propertyName, String defaultValue)
public static String getSystemPropertyOrEnvVar(String systemPropertyName, String envVarName, String defaultValue)
public static String convertSystemPropertyNameToEnvVar(String systemPropertyName)
public static String getSystemPropertyOrEnvVar(String systemPropertyName, String defaultValue)
public static Boolean getSystemPropertyOrEnvVar(String systemPropertyName, Boolean defaultValue)
public static int getSystemPropertyOrEnvVar(String systemPropertyName, int defaultValue)
public static boolean waitUntilReady(BlockingQueue<Object> queue, long amount, TimeUnit timeUnit)
queue
- The communication channel.amount
- The amount of time to wait.timeUnit
- The time unit.Copyright © 2015–2017 Red Hat. All rights reserved.