
org.revenj.patterns.Query Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of revenj-core Show documentation
Show all versions of revenj-core Show documentation
DSL Platform compatible backend (https://dsl-platform.com)
The newest version!
package org.revenj.patterns;
import java.io.Serializable;
import java.io.IOException;
import java.util.List;
import java.util.Optional;
import java.util.stream.Stream;
public interface Query {
Query filter(Specification predicate);
Query skip(long n);
Query limit(long n);
@FunctionalInterface
interface Compare extends Serializable {
V compare(U item);
}
Query sortedBy(Compare order);
Query sortedDescendingBy(Compare order);
long count() throws IOException;
boolean anyMatch(Specification super T> predicate) throws IOException;
default boolean any() throws IOException {
return anyMatch(null);
}
boolean allMatch(Specification super T> predicate) throws IOException;
boolean noneMatch(Specification super T> predicate) throws IOException;
Optional findFirst() throws IOException;
Optional findAny() throws IOException;
List list() throws IOException;
default Stream stream() throws IOException {
return list().stream();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy