public final class CmsClientCollectionUtil
extends java.lang.Object
限定符和类型 | 方法和说明 |
---|---|
static <A> java.util.Set<A> |
intersection(java.util.Set<A> first,
java.util.Set<A> second)
Returns the intersection of two sets without modifying the original sets.
|
static boolean |
isEmptyOrNull(java.util.Collection<?> collection)
Checks whether a collection is empty or null.
|
static java.util.Map<java.lang.String,java.lang.String> |
parseProperties(java.lang.String text)
Parses properties from a string and returns them in a map.
|
static <A,B> java.util.Map<A,B> |
removeNullEntries(java.util.Map<A,B> map)
Returns a new map with all entries of the input map except those which have a value of null.
|
static <A,B> void |
updateMapAndRemoveNulls(java.util.Map<A,B> source,
java.util.Map<A,B> target)
Copies entries from one map to another and deletes those entries in the target map for which
the value in the source map is null.
|
public static <A> java.util.Set<A> intersection(java.util.Set<A> first, java.util.Set<A> second)
A
- the type of objects contained in the setsfirst
- the first setsecond
- the second setpublic static boolean isEmptyOrNull(java.util.Collection<?> collection)
collection
- a collectioncollection
is null
or empty.public static java.util.Map<java.lang.String,java.lang.String> parseProperties(java.lang.String text)
text
- the text containing the propertiespublic static <A,B> java.util.Map<A,B> removeNullEntries(java.util.Map<A,B> map)
A
- the key type of the mapB
- the value type of the mapmap
- the input mappublic static <A,B> void updateMapAndRemoveNulls(java.util.Map<A,B> source, java.util.Map<A,B> target)
A
- the key type of the mapB
- the value type of the mapsource
- the source maptarget
- the target map