public class CollectionUtil extends Object
| Constructor and Description |
|---|
CollectionUtil() |
| Modifier and Type | Method and Description |
|---|---|
static <T> boolean |
contains(T[] collection,
T target)
Check whether target exist in collection
|
static <T> boolean |
containsAny(Collection<T> collectionLeft,
Collection<T> collectionRight)
Check two collection has any equaled item
|
static String |
joinToString(Collection<?> collection,
String joinSymbol)
Join a collection into string
|
public static String joinToString(Collection<?> collection, String joinSymbol)
collection - many items with proper toString() methodjoinSymbol - splitter of echo itemspublic static <T> boolean contains(T[] collection,
T target)
collection - many items to find fromtarget - an item to be foundpublic static <T> boolean containsAny(Collection<T> collectionLeft, Collection<T> collectionRight)
collectionLeft - the first collectioncollectionRight - the second collectionCopyright © 2022. All rights reserved.