Bugfixes
This commit is contained in:
parent
1f6ad95f92
commit
3aaa787198
@ -1,7 +1,6 @@
|
|||||||
package org.warp.commonutils.type;
|
package org.warp.commonutils.type;
|
||||||
|
|
||||||
import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet;
|
import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet;
|
||||||
import it.unimi.dsi.fastutil.objects.ObjectSets.UnmodifiableSet;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
@ -4,6 +4,7 @@ import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet;
|
|||||||
import it.unimi.dsi.fastutil.objects.ObjectSets;
|
import it.unimi.dsi.fastutil.objects.ObjectSets;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.NoSuchElementException;
|
import java.util.NoSuchElementException;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -70,7 +71,7 @@ public interface UnmodifiableIterableSet<K> extends Iterable<K> {
|
|||||||
@Override
|
@Override
|
||||||
public Set<K> toUnmodifiableSet() {
|
public Set<K> toUnmodifiableSet() {
|
||||||
//noinspection unchecked
|
//noinspection unchecked
|
||||||
return ObjectSets.EMPTY_SET;
|
return new HashSet<>(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -120,7 +121,7 @@ public interface UnmodifiableIterableSet<K> extends Iterable<K> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<K> toUnmodifiableSet() {
|
public Set<K> toUnmodifiableSet() {
|
||||||
return ObjectSets.unmodifiable(new ObjectOpenHashSet<>(items, 1.0f));
|
return new HashSet<>(Arrays.asList(items));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -6,6 +6,7 @@ import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet;
|
|||||||
import it.unimi.dsi.fastutil.objects.ObjectSet;
|
import it.unimi.dsi.fastutil.objects.ObjectSet;
|
||||||
import it.unimi.dsi.fastutil.objects.ObjectSets;
|
import it.unimi.dsi.fastutil.objects.ObjectSets;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.NoSuchElementException;
|
import java.util.NoSuchElementException;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -96,7 +97,7 @@ public interface UnmodifiableSet<K> extends UnmodifiableIterableSet<K> {
|
|||||||
@Override
|
@Override
|
||||||
public Set<K> toUnmodifiableSet() {
|
public Set<K> toUnmodifiableSet() {
|
||||||
//noinspection unchecked
|
//noinspection unchecked
|
||||||
return ObjectSets.EMPTY_SET;
|
return new HashSet<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user