aboutsummaryrefslogtreecommitdiff
path: root/dotnet/Mammoth/Couscous/mammoth/internal/util/Sets.cs
diff options
context:
space:
mode:
Diffstat (limited to 'dotnet/Mammoth/Couscous/mammoth/internal/util/Sets.cs')
-rw-r--r--dotnet/Mammoth/Couscous/mammoth/internal/util/Sets.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/dotnet/Mammoth/Couscous/mammoth/internal/util/Sets.cs b/dotnet/Mammoth/Couscous/mammoth/internal/util/Sets.cs
new file mode 100644
index 0000000..7843537
--- /dev/null
+++ b/dotnet/Mammoth/Couscous/mammoth/internal/util/Sets.cs
@@ -0,0 +1,19 @@
+using Mammoth.Couscous.java.lang;
+using Mammoth.Couscous.java.util;
+using Mammoth.Couscous.java.nio.file;
+using System;
+
+namespace Mammoth.Couscous.org.zwobble.mammoth.@internal.util
+{
+ internal static class Sets
+ {
+ internal static Set<T> set<T>(T[] values) {
+ return new HashSet<T>(new System.Collections.Generic.HashSet<T>(values));
+ }
+
+ internal static Set<T> toSet<T>(Iterable<T> iterable) {
+ return new HashSet<T>(new System.Collections.Generic.HashSet<T>(FromJava.IterableToEnumerable(iterable)));
+ }
+ }
+}
+