summaryrefslogtreecommitdiff
path: root/base/src/main/java/bjc/utils/funcutils/SetUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'base/src/main/java/bjc/utils/funcutils/SetUtils.java')
-rw-r--r--base/src/main/java/bjc/utils/funcutils/SetUtils.java29
1 files changed, 12 insertions, 17 deletions
diff --git a/base/src/main/java/bjc/utils/funcutils/SetUtils.java b/base/src/main/java/bjc/utils/funcutils/SetUtils.java
index b721d10..799eadc 100644
--- a/base/src/main/java/bjc/utils/funcutils/SetUtils.java
+++ b/base/src/main/java/bjc/utils/funcutils/SetUtils.java
@@ -5,20 +5,17 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
-/**
- * Various utility functions dealing with sets.
+/** Various utility functions dealing with sets.
*
- * @author bjculkin
- *
- */
+ * @author bjculkin */
public class SetUtils {
- /**
- * Create a power-set (set of all subsets) of a given set.
+ /** Create a power-set (set of all subsets) of a given set.
*
- * @param <T> The type of elements contained in the set.
+ * @param <T> The type of element in the set.
+ *
* @param originalSet The set to create a power-set of.
- * @return The power-set of the set.
- */
+ *
+ * @return The power-set of the set. */
public static <T> Set<Set<T>> powerSet(Set<T> originalSet) {
Set<Set<T>> sets = new HashSet<>();
@@ -52,19 +49,17 @@ public class SetUtils {
return sets;
}
- /**
- * Utility method for set construction.
+ /** Utility method for set construction.
*
- * @param <T> The type of elements in the set.
+ * @param <T> The type of element in the set.
+ *
* @param elms The elements to stick in the set.
- * @return A set containing the specified elements.
- */
+ *
+ * @return A set containing the specified elements. */
@SafeVarargs
public static <T> Set<T> toSet(T... elms) {
Set<T> set = new HashSet<>();
-
for (T elm : elms) set.add(elm);
-
return set;
}
}