Package org.forgerock.openig.tools
Class Utils
java.lang.Object
org.forgerock.openig.tools.Utils
Utility class.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> List<T>
Returns an immutableList
.static <K,
V> Map<K, V> immutableMap
(Map<K, V> map, Supplier<Map<K, V>> supplier) Creates an immutableMap
.throwableCauses
(Throwable throwable)
-
Method Details
-
immutable
Returns an immutableList
.- Type Parameters:
T
- The type of elements of this list.- Parameters:
list
- The original list to copy.listSupplier
- A function which returns a new emptyList
into which the results will be inserted.- Returns:
- An immutable list of strings.
-
immutableMap
Creates an immutableMap
.Note: This method uses a reference for the value. If the map value is not a primitive type, such as a list of strings, you may consider using
.immutable
method before creating yourimmutableMap
- Type Parameters:
K
- Key type of theMap
.V
- Value type of theMap
.- Parameters:
map
- The original map to copy.supplier
- A function which returns a new emptyMap
into which the results will be inserted.- Returns:
- An immutable
Map
.
-
throwableCauses
-