public class ExceptionMessageUtils extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
ExceptionMessageUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> String |
printList(Collection<T> collection,
Function<T,String> printValueFunction)
Print a
Collection as a String. |
static <T,V> String |
printMap(Map<T,V> map,
Function<T,String> printKey,
Function<V,String> printValue)
|
static <T> String |
printValues(Function<T,String> printValueFunction,
T... collection)
Print a
Collection as a String. |
public static <T> String printList(Collection<T> collection, Function<T,String> printValueFunction)
Collection as a String.
Loop through the collection and apply a function to print the elements of the collection.
T - the type of the elements in the collection.collection - the collection.printValueFunction - the print function.public static <T> String printValues(Function<T,String> printValueFunction, T... collection)
Collection as a String.
Loop through the collection and apply a function to print the elements of the collection.
T - the type of the elements in the collection.collection - the collection.printValueFunction - the print function.public static <T,V> String printMap(Map<T,V> map, Function<T,String> printKey, Function<V,String> printValue)
Map as a String.
Loop through the map and apply a function to print the elements (key, value_) of the map.
T - the type of the elements for the keys.V - the type of the elements for the values.map - the collection.printKey - the print function for the key.printValue - the print function for the value.Copyright © 2021 Crabs Hue. All rights reserved.