com.mailgun.util.CollectionUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mailgun-java Show documentation
Show all versions of mailgun-java Show documentation
The Mailgun SDK for Java enables Java developers to work with Mailgun API
efficiently.
package com.mailgun.util;
import lombok.experimental.UtilityClass;
import java.util.Collection;
import java.util.LinkedHashSet;
import java.util.Objects;
import java.util.Set;
@UtilityClass
public class CollectionUtil {
public Set addToSet(Set internalSet, T provideValue) {
if (Objects.isNull(internalSet)) {
internalSet = new LinkedHashSet<>();
}
internalSet.add(provideValue);
return internalSet;
}
public Set addToSet(Set internalSet, Collection provideValues) {
if (Objects.isNull(internalSet)) {
internalSet = new LinkedHashSet<>();
}
internalSet.addAll(provideValues);
return internalSet;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy