Strings
, Closeables
, Objects
or Threads
instead.@Deprecated public final class Utils extends Object
Modifier and Type | Method and Description |
---|---|
static <T extends Enum<T>> |
asEnum(String value,
Class<T> type)
Deprecated.
|
static void |
closeSilently(Closeable... resources)
Deprecated.
|
static void |
closeSilently(Iterable<? extends Closeable> resources)
Deprecated.
|
static int |
compareValues(Object v1,
Object v2)
Deprecated.
|
static boolean |
isBlank(CharSequence charSeq)
Deprecated.
|
static boolean |
isCompatible(Object v1,
Object v2)
Deprecated.
|
static boolean |
isNullOrEmpty(String value)
Deprecated.
|
static void |
joinAsString(StringBuilder builder,
String separator,
Iterable<?> values)
Deprecated.
|
static void |
joinAsString(StringBuilder builder,
String separator,
Object... values)
Deprecated.
|
static String |
joinAsString(String separator,
Iterable<?> values)
Deprecated.
|
static String |
joinAsString(String separator,
Object... values)
Deprecated.
|
static ThreadFactory |
newThreadFactory(ThreadGroup group,
String nameTemplate,
boolean isDaemon)
Deprecated.
|
@Deprecated public static void closeSilently(Closeable... resources)
Closeables.closeSilently(Closeable...)
resources
- The resources to be closed, which may be null
.@Deprecated public static void closeSilently(Iterable<? extends Closeable> resources)
Closeables.closeSilently(Iterable)
resources
- The resources to be closed, which may be null
.@Deprecated public static String joinAsString(String separator, Object... values)
Strings.joinAsString(String, Object...)
separator
- The separator string.values
- The objects to be joined.NullPointerException
- If values
or separator
were null
.@Deprecated public static String joinAsString(String separator, Iterable<?> values)
Strings.joinAsString(String, Iterable)
separator
- The separator string.values
- The iterable whose elements are to be joined.NullPointerException
- If separator
or values
were null
.@Deprecated public static void joinAsString(StringBuilder builder, String separator, Object... values)
Strings.joinAsString(StringBuilder, String, Object...)
StringBuilder
the string representation
of the provided objects concatenated together using the provided separator.builder
- The String builder where to append.separator
- The separator string.values
- The objects to be joined.NullPointerException
- If builder
, separator
or values
were null
.@Deprecated public static void joinAsString(StringBuilder builder, String separator, Iterable<?> values)
Strings.joinAsString(StringBuilder, String, Iterable)
StringBuilder
the string representation
of the objects contained in the provided iterable concatenated together
using the provided separator.builder
- The String builder where to append.separator
- The separator string.values
- The iterable whose elements are to be joined.NullPointerException
- If builder
, separator
or values
were null
.@Deprecated public static ThreadFactory newThreadFactory(ThreadGroup group, String nameTemplate, boolean isDaemon)
Threads.newThreadFactory(ThreadGroup, String, boolean)
group
- The thread group, which may be null
.nameTemplate
- The thread name format string which may contain a "%d" format
option which will be substituted with the thread count.isDaemon
- Indicates whether or not threads should be daemon threads.@Deprecated public static <T extends Enum<T>> T asEnum(String value, Class<T> type)
Strings.asEnum(String, Class)
null
, this method returns
null
.T
- the enum type sub-class.value
- the string valuetype
- the enum type to match constants with the value.IllegalArgumentException
- if type
does not represent an enum type,
of if value
does not match one of the enum constantsNullPointerException
- if type
is null
.@Deprecated public static boolean isNullOrEmpty(String value)
Strings.isNullOrEmpty(String)
null
or empty.value
- The value to check.true
if the value is either null
or is empty.@Deprecated public static boolean isBlank(CharSequence charSeq)
Strings.isBlank(CharSequence)
charSeq
- Sequence to test (String is also a CharSequence)@Deprecated public static int compareValues(Object v1, Object v2)
Objects.compareValues(Object, Object)
v1
- the first objectv2
- the second object@Deprecated public static boolean isCompatible(Object v1, Object v2)
Objects.isCompatible(Object, Object)
v1
- the first objectv2
- the second objectCopyright © 2010-2018, ForgeRock All Rights Reserved.