public class OkkamSets extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> Set<T> |
addIfNotNull(Set<T> set,
T element)
Add if not empty.
|
static <T> Set<T> |
addSafeToHashSet(Set<T> set,
T... elements)
Add elements to the HashSet.
|
static <T> Set<T> |
createHashSetIfNull(Set<T> set)
Create an HashSet if the Set is null.
|
public static <T> Set<T> addIfNotNull(Set<T> set, T element)
T - The Set and element typeset - The input setelement - The element to addpublic static <T> Set<T> createHashSetIfNull(Set<T> set)
T - The Set typeset - The input set@SafeVarargs public static <T> Set<T> addSafeToHashSet(Set<T> set, T... elements)
T - The Set typeset - The input setelements - The elements to addCopyright © 2018 Okkam srl. All rights reserved.