added lexer and parser basics
This commit is contained in:
@@ -0,0 +1,240 @@
|
||||
package p.studio.utilities.structures;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public interface MutableList<T> extends ReadOnlyCollection<T>, List<T> {
|
||||
static <T> MutableList<T> create() {
|
||||
return wrapInternal(new ArrayList<>());
|
||||
}
|
||||
|
||||
static <T> MutableList<T> withCapacity(final int initialCapacity) {
|
||||
return wrapInternal(new ArrayList<>(initialCapacity));
|
||||
}
|
||||
|
||||
static <T> MutableList<T> wrap(final Collection<T> c) {
|
||||
if (c == null || c.isEmpty()) {
|
||||
return MutableList.create();
|
||||
}
|
||||
return wrapInternal(new ArrayList<>(c));
|
||||
}
|
||||
|
||||
@SafeVarargs
|
||||
static <T> MutableList<T> from(final T... values) {
|
||||
if (values == null || values.length == 0) {
|
||||
return MutableList.create();
|
||||
}
|
||||
return MutableList.wrap(Stream.of(values).toList());
|
||||
}
|
||||
|
||||
private static <T> MutableList<T> wrapInternal(final List<T> list) {
|
||||
return new MutableList<>() {
|
||||
@Override
|
||||
public List<T> asList() {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
if (o == this) return true;
|
||||
if (o instanceof MutableList<?> other) {
|
||||
return elementsEqual(other);
|
||||
}
|
||||
if (o instanceof ReadOnlyList<?> otherReadOnly) {
|
||||
return elementsEqual(otherReadOnly);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return list.hashCode();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
List<T> asList();
|
||||
|
||||
@Override
|
||||
default Collection<T> asCollection() {
|
||||
return asList();
|
||||
}
|
||||
|
||||
@Override
|
||||
default int size() {
|
||||
return asList().size();
|
||||
}
|
||||
|
||||
@Override
|
||||
default boolean isEmpty() {
|
||||
return asList().isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
default boolean contains(final Object o) {
|
||||
return asList().contains(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
default java.util.Iterator<T> iterator() {
|
||||
return asList().iterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
default java.util.Spliterator<T> spliterator() {
|
||||
return asList().spliterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
default Object[] toArray() {
|
||||
return asList().toArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
default <T1> T1[] toArray(final T1[] a) {
|
||||
return asList().toArray(a);
|
||||
}
|
||||
|
||||
@Override
|
||||
default boolean add(final T t) {
|
||||
return asList().add(t);
|
||||
}
|
||||
|
||||
@Override
|
||||
default boolean remove(final Object o) {
|
||||
return asList().remove(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
default boolean containsAll(final Collection<?> c) {
|
||||
return asList().containsAll(c);
|
||||
}
|
||||
|
||||
@Override
|
||||
default boolean addAll(final Collection<? extends T> c) {
|
||||
return asList().addAll(c);
|
||||
}
|
||||
|
||||
@Override
|
||||
default boolean addAll(final int index, final Collection<? extends T> c) {
|
||||
return asList().addAll(index, c);
|
||||
}
|
||||
|
||||
@Override
|
||||
default boolean removeAll(final Collection<?> c) {
|
||||
return asList().removeAll(c);
|
||||
}
|
||||
|
||||
@Override
|
||||
default boolean retainAll(final Collection<?> c) {
|
||||
return asList().retainAll(c);
|
||||
}
|
||||
|
||||
@Override
|
||||
default void clear() {
|
||||
asList().clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
default T get(final int index) {
|
||||
return asList().get(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
default T set(final int index, final T element) {
|
||||
return asList().set(index, element);
|
||||
}
|
||||
|
||||
@Override
|
||||
default void add(final int index, final T element) {
|
||||
asList().add(index, element);
|
||||
}
|
||||
|
||||
@Override
|
||||
default T remove(final int index) {
|
||||
return asList().remove(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
default int indexOf(final Object o) {
|
||||
return asList().indexOf(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
default int lastIndexOf(final Object o) {
|
||||
return asList().lastIndexOf(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
default ListIterator<T> listIterator() {
|
||||
return asList().listIterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
default ListIterator<T> listIterator(final int index) {
|
||||
return asList().listIterator(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
default List<T> subList(final int fromIndex, final int toIndex) {
|
||||
return asList().subList(fromIndex, toIndex);
|
||||
}
|
||||
|
||||
@Override
|
||||
default Stream<T> stream() {
|
||||
return asList().stream();
|
||||
}
|
||||
|
||||
default T getFirst() {
|
||||
return asList().getFirst();
|
||||
}
|
||||
|
||||
default T getLast() {
|
||||
return asList().getLast();
|
||||
}
|
||||
|
||||
default MutableList<T> mutableSubList(final int fromIndex, final int toIndex) {
|
||||
return MutableList.wrap(subList(fromIndex, toIndex));
|
||||
}
|
||||
|
||||
default ReadOnlyList<T> toReadOnlyList() {
|
||||
return ReadOnlyList.wrap(asList());
|
||||
}
|
||||
|
||||
default ReadOnlyList<T> immutableSubList(final int fromIndex, final int toIndex) {
|
||||
return ReadOnlyList.wrap(subList(fromIndex, toIndex));
|
||||
}
|
||||
|
||||
default ReadOnlyList<T> immutableSort(final java.util.Comparator<? super T> c) {
|
||||
if (c == null) {
|
||||
return ReadOnlyList.wrap(asList().stream().sorted().toList());
|
||||
}
|
||||
return ReadOnlyList.wrap(asList().stream().sorted(c).toList());
|
||||
}
|
||||
|
||||
default ReadOnlyList<T> invert() {
|
||||
final var inverted = new ArrayList<>(asList());
|
||||
java.util.Collections.reverse(inverted);
|
||||
return ReadOnlyList.wrap(inverted);
|
||||
}
|
||||
|
||||
default boolean elementsEqual(final ReadOnlyList<?> other) {
|
||||
if (other == null || other.size() != size()) {
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < size(); i++) {
|
||||
if (!Objects.equals(get(i), other.get(i))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
default boolean elementsEqual(final MutableList<?> other) {
|
||||
return elementsEqual(other == null ? null : other.toReadOnlyList());
|
||||
}
|
||||
}
|
||||
+76
-55
@@ -1,94 +1,115 @@
|
||||
package p.studio.utilities.structures;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Spliterator;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public class ReadOnlyCollection<T> implements Iterable<T> {
|
||||
protected final Collection<T> collection;
|
||||
|
||||
protected ReadOnlyCollection(final Collection<T> collection) {
|
||||
this.collection = collection;
|
||||
public interface ReadOnlyCollection<T> extends Iterable<T> {
|
||||
static <T> ReadOnlyCollection<T> empty() {
|
||||
return wrap(List.of());
|
||||
}
|
||||
|
||||
public static <T> ReadOnlyCollection<T> empty() {
|
||||
return ReadOnlyCollection.wrap(List.of());
|
||||
}
|
||||
|
||||
public static <T> ReadOnlyCollection<T> wrap(final Collection<T> collection) {
|
||||
return new ReadOnlyCollection<>(collection);
|
||||
static <T> ReadOnlyCollection<T> wrap(final Collection<T> collection) {
|
||||
if (collection == null || collection.isEmpty()) {
|
||||
return wrapInternal(List.of());
|
||||
}
|
||||
return wrapInternal(List.copyOf(collection));
|
||||
}
|
||||
|
||||
@SafeVarargs
|
||||
public static <T> ReadOnlyCollection<T> with(final T... ts) {
|
||||
if (ts == null) return ReadOnlyCollection.empty();
|
||||
if (ts.length == 0) return ReadOnlyCollection.empty();
|
||||
return new ReadOnlyCollection<>(Stream.of(ts).toList());
|
||||
static <T> ReadOnlyCollection<T> with(final T... values) {
|
||||
if (values == null || values.length == 0) {
|
||||
return ReadOnlyCollection.empty();
|
||||
}
|
||||
return ReadOnlyCollection.wrap(Stream.of(values).toList());
|
||||
}
|
||||
|
||||
public static <T> boolean isEmpty(final ReadOnlyCollection<T> c) {
|
||||
if (c == null) return true;
|
||||
return c.isEmpty();
|
||||
static <T> boolean isEmpty(final ReadOnlyCollection<T> c) {
|
||||
return c == null || c.isEmpty();
|
||||
}
|
||||
|
||||
public static <T> boolean isNotEmpty(final ReadOnlyCollection<T> c) {
|
||||
static <T> boolean isNotEmpty(final ReadOnlyCollection<T> c) {
|
||||
return !isEmpty(c);
|
||||
}
|
||||
|
||||
public int size() {
|
||||
return collection.size();
|
||||
private static <T> ReadOnlyCollection<T> wrapInternal(final Collection<T> collection) {
|
||||
return new ReadOnlyCollection<>() {
|
||||
@Override
|
||||
public Collection<T> asCollection() {
|
||||
return collection;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
if (o == this) return true;
|
||||
if (o instanceof ReadOnlyCollection<?> other) {
|
||||
return asCollection().equals(other.asCollection());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return collection.hashCode();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
return collection.isEmpty();
|
||||
Collection<T> asCollection();
|
||||
|
||||
default int size() {
|
||||
return asCollection().size();
|
||||
}
|
||||
|
||||
public boolean contains(final T o) {
|
||||
return collection.contains(o);
|
||||
default boolean isEmpty() {
|
||||
return asCollection().isEmpty();
|
||||
}
|
||||
|
||||
public boolean containsAll(final ReadOnlyCollection<T> c) {
|
||||
return c.stream().allMatch(collection::contains);
|
||||
default boolean contains(final Object o) {
|
||||
return asCollection().contains(o);
|
||||
}
|
||||
|
||||
public boolean containsAny(final ReadOnlyCollection<T> c) {
|
||||
return c.stream().anyMatch(collection::contains);
|
||||
default boolean containsAll(final ReadOnlyCollection<T> c) {
|
||||
if (ReadOnlyCollection.isEmpty(c)) {
|
||||
return true;
|
||||
}
|
||||
return c.stream().allMatch(this::contains);
|
||||
}
|
||||
|
||||
public Iterator<T> iterator() {
|
||||
return collection.iterator();
|
||||
default boolean containsAny(final ReadOnlyCollection<T> c) {
|
||||
if (ReadOnlyCollection.isEmpty(c)) {
|
||||
return false;
|
||||
}
|
||||
return c.stream().anyMatch(this::contains);
|
||||
}
|
||||
|
||||
public Stream<T> stream() {
|
||||
return collection.stream();
|
||||
@Override
|
||||
default Iterator<T> iterator() {
|
||||
return asCollection().iterator();
|
||||
}
|
||||
|
||||
public <R> Stream<R> map(final Function<T, R> mapper) {
|
||||
@Override
|
||||
default Spliterator<T> spliterator() {
|
||||
return asCollection().spliterator();
|
||||
}
|
||||
|
||||
default Stream<T> stream() {
|
||||
return asCollection().stream();
|
||||
}
|
||||
|
||||
default <R> Stream<R> map(final Function<T, R> mapper) {
|
||||
return stream().map(mapper);
|
||||
}
|
||||
|
||||
public T[] toArray(final Supplier<T[]> factory) {
|
||||
return collection.toArray(factory.get());
|
||||
default T[] toArray(final Supplier<T[]> factory) {
|
||||
return asCollection().toArray(factory.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
if (o == this) return true;
|
||||
if (o == null) return false;
|
||||
if (o instanceof ReadOnlyCollection<?> c) {
|
||||
return c.collection.equals(collection);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return collection.hashCode();
|
||||
}
|
||||
|
||||
public Spliterator<T> spliterator() {
|
||||
return collection.spliterator();
|
||||
default MutableList<T> toMutableList() {
|
||||
return MutableList.wrap(asCollection());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,92 +1,126 @@
|
||||
package p.studio.utilities.structures;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public class ReadOnlyList<T> extends ReadOnlyCollection<T> {
|
||||
private ReadOnlyList(final List<T> list) {
|
||||
super(list);
|
||||
public interface ReadOnlyList<T> extends ReadOnlyCollection<T> {
|
||||
static <T> ReadOnlyList<T> empty() {
|
||||
return wrapInternal(List.of());
|
||||
}
|
||||
|
||||
public static <T> ReadOnlyList<T> empty() {
|
||||
return ReadOnlyList.wrap(List.of());
|
||||
}
|
||||
|
||||
public static <T> ReadOnlyList<T> wrap(final List<T> list) {
|
||||
return new ReadOnlyList<>(list);
|
||||
}
|
||||
|
||||
public static <T> ReadOnlyList<T> wrap(final ReadOnlyCollection<T> c) {
|
||||
if (ReadOnlyCollection.isEmpty(c)) return ReadOnlyList.empty();
|
||||
return ReadOnlyList.wrap(new ArrayList<>(c.collection));
|
||||
}
|
||||
|
||||
public static <T> ReadOnlyList<T> wrap(final Set<T> set) {
|
||||
return new ReadOnlyList<>(List.copyOf(set));
|
||||
static <T> ReadOnlyList<T> wrap(final Collection<T> c) {
|
||||
if (c == null || c.isEmpty()) {
|
||||
return ReadOnlyList.empty();
|
||||
}
|
||||
return wrapInternal(List.copyOf(c));
|
||||
}
|
||||
|
||||
@SafeVarargs
|
||||
public static <T> ReadOnlyList<T> from(final T... values) {
|
||||
if (values == null) return ReadOnlyList.empty();
|
||||
if (values.length == 0) return ReadOnlyList.empty();
|
||||
static <T> ReadOnlyList<T> from(final T... values) {
|
||||
if (values == null || values.length == 0) {
|
||||
return ReadOnlyList.empty();
|
||||
}
|
||||
return ReadOnlyList.wrap(Stream.of(values).toList());
|
||||
}
|
||||
|
||||
private static <T> ReadOnlyList<T> wrapInternal(final List<T> list) {
|
||||
return new ReadOnlyList<>() {
|
||||
@Override
|
||||
public List<T> asList() {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
if (o == this) return true;
|
||||
if (o instanceof ReadOnlyList<?> other) {
|
||||
return elementsEqual(other);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return list.hashCode();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
List<T> asList();
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
if (o == this) return true;
|
||||
if (o == null) return false;
|
||||
if (o instanceof ReadOnlyList<?> c) {
|
||||
return c.collection.equals(collection);
|
||||
default Collection<T> asCollection() {
|
||||
return asList();
|
||||
}
|
||||
|
||||
default T get(final int index) {
|
||||
return asList().get(index);
|
||||
}
|
||||
|
||||
default int indexOf(final Object o) {
|
||||
return asList().indexOf(o);
|
||||
}
|
||||
|
||||
default int lastIndexOf(final Object o) {
|
||||
return asList().lastIndexOf(o);
|
||||
}
|
||||
|
||||
default ListIterator<T> listIterator() {
|
||||
return asList().listIterator();
|
||||
}
|
||||
|
||||
default ListIterator<T> listIterator(final int index) {
|
||||
return asList().listIterator(index);
|
||||
}
|
||||
|
||||
default ReadOnlyList<T> immutableSubList(final int fromIndex, final int toIndex) {
|
||||
return ReadOnlyList.wrap(asList().subList(fromIndex, toIndex));
|
||||
}
|
||||
|
||||
default T getFirst() {
|
||||
return asList().getFirst();
|
||||
}
|
||||
|
||||
default T getLast() {
|
||||
return asList().getLast();
|
||||
}
|
||||
|
||||
default ReadOnlyList<T> immutableSort(final Comparator<? super T> c) {
|
||||
if (c == null) {
|
||||
return ReadOnlyList.wrap(asList().stream().sorted().toList());
|
||||
}
|
||||
return false;
|
||||
return ReadOnlyList.wrap(asList().stream().sorted(c).toList());
|
||||
}
|
||||
|
||||
public T get(final int index) {
|
||||
return ((List<T>)collection).get(index);
|
||||
}
|
||||
|
||||
public int indexOf(final T o) {
|
||||
return ((List<T>)collection).indexOf(o);
|
||||
}
|
||||
|
||||
public int lastIndexOf(final T o) {
|
||||
return ((List<T>)collection).lastIndexOf(o);
|
||||
}
|
||||
|
||||
public ListIterator<T> listIterator() {
|
||||
return ((List<T>)collection).listIterator();
|
||||
}
|
||||
|
||||
public ListIterator<T> listIterator(final int index) {
|
||||
return ((List<T>)collection).listIterator(index);
|
||||
}
|
||||
|
||||
public ReadOnlyList<T> subList(final int fromIndex, final int toIndex) {
|
||||
return ReadOnlyList.wrap(((List<T>)collection).subList(fromIndex, toIndex));
|
||||
}
|
||||
|
||||
public T getFirst() {
|
||||
return ((List<T>)collection).getFirst();
|
||||
}
|
||||
|
||||
public T getLast() {
|
||||
return ((List<T>)collection).getLast();
|
||||
}
|
||||
|
||||
public ReadOnlyList<T> sort(final Comparator<? super T> c) {
|
||||
Stream<T> s = collection.stream();
|
||||
if (Objects.isNull(c)) {
|
||||
s = s.sorted();
|
||||
} else {
|
||||
s = s.sorted(c);
|
||||
}
|
||||
return ReadOnlyList.wrap(s.toList());
|
||||
}
|
||||
|
||||
public ReadOnlyList<T> invert() {
|
||||
final var inverted = new ArrayList<>(collection);
|
||||
default ReadOnlyList<T> invert() {
|
||||
final var inverted = new ArrayList<>(asList());
|
||||
java.util.Collections.reverse(inverted);
|
||||
return ReadOnlyList.wrap(inverted);
|
||||
}
|
||||
|
||||
default Stream<T> stream() {
|
||||
return asList().stream();
|
||||
}
|
||||
|
||||
@Override
|
||||
default MutableList<T> toMutableList() {
|
||||
return MutableList.wrap(asList());
|
||||
}
|
||||
|
||||
default boolean elementsEqual(final ReadOnlyList<?> other) {
|
||||
if (other == null || other.size() != size()) {
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < size(); i++) {
|
||||
if (!Objects.equals(get(i), other.get(i))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,36 +1,69 @@
|
||||
package p.studio.utilities.structures;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public class ReadOnlySet<T> extends ReadOnlyCollection<T> {
|
||||
protected ReadOnlySet(final Set<T> set) {
|
||||
super(set);
|
||||
public interface ReadOnlySet<T> extends ReadOnlyCollection<T> {
|
||||
static <T> ReadOnlySet<T> empty() {
|
||||
return wrapInternal(Set.of());
|
||||
}
|
||||
|
||||
public static <T> ReadOnlySet<T> empty() {
|
||||
return ReadOnlySet.wrap(Set.of());
|
||||
static <T> ReadOnlySet<T> wrap(final Set<T> set) {
|
||||
if (set == null || set.isEmpty()) {
|
||||
return ReadOnlySet.empty();
|
||||
}
|
||||
return wrapInternal(Set.copyOf(set));
|
||||
}
|
||||
|
||||
public static <T> ReadOnlySet<T> wrap(final Set<T> set) {
|
||||
return new ReadOnlySet<>(set);
|
||||
static <T> ReadOnlySet<T> wrap(final Collection<T> collection) {
|
||||
if (collection == null || collection.isEmpty()) {
|
||||
return ReadOnlySet.empty();
|
||||
}
|
||||
return wrapInternal(Set.copyOf(collection));
|
||||
}
|
||||
|
||||
@SafeVarargs
|
||||
public static <T> ReadOnlySet<T> from(final T... values) {
|
||||
if (values == null) return ReadOnlySet.empty();
|
||||
if (values.length == 0) return ReadOnlySet.empty();
|
||||
static <T> ReadOnlySet<T> from(final T... values) {
|
||||
if (values == null || values.length == 0) {
|
||||
return ReadOnlySet.empty();
|
||||
}
|
||||
return ReadOnlySet.wrap(Stream.of(values).collect(Collectors.toSet()));
|
||||
}
|
||||
|
||||
private static <T> ReadOnlySet<T> wrapInternal(final Set<T> set) {
|
||||
return new ReadOnlySet<>() {
|
||||
@Override
|
||||
public Set<T> asSet() {
|
||||
return set;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
if (o == this) return true;
|
||||
if (o instanceof ReadOnlySet<?> other) {
|
||||
return asSet().equals(other.asSet());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return set.hashCode();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Set<T> asSet();
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
if (o == this) return true;
|
||||
if (o == null) return false;
|
||||
if (o instanceof ReadOnlySet<?> c) {
|
||||
return c.collection.equals(collection);
|
||||
}
|
||||
return false;
|
||||
default Collection<T> asCollection() {
|
||||
return asSet();
|
||||
}
|
||||
|
||||
@Override
|
||||
default Stream<T> stream() {
|
||||
return asSet().stream();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user