|
@@ -230,11 +230,11 @@ public interface CQuery<T> extends Iterable<T> {
|
|
|
return new CQueryAbstract.CQCollection<>(source);
|
|
return new CQueryAbstract.CQCollection<>(source);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public final <T extends F> CQuery<T> collection(Supplier<Collection<T>> source) {
|
|
|
|
|
- return new CQueryAbstract.CQCollection<>(source);
|
|
|
|
|
|
|
+ public final <T extends F> CQuery<T> collection(CheckedSupplier<Collection<T>, ?> source) {
|
|
|
|
|
+ return new CQueryAbstract.CQCollection<>(source::$get);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public final <T extends F,P> CQuery<T> collection(P param, Function<? super P, Collection<T>> source) {
|
|
|
|
|
|
|
+ public final <T extends F,P> CQuery<T> collection(P param, CheckedFunction<? super P, Collection<T>, ?> source) {
|
|
|
return collection(() -> source.apply(param));
|
|
return collection(() -> source.apply(param));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -242,28 +242,28 @@ public interface CQuery<T> extends Iterable<T> {
|
|
|
return new CQueryAbstract.CQArray<>(source);
|
|
return new CQueryAbstract.CQArray<>(source);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public final <T extends F> CQuery<T> array(Supplier<T[]> source) {
|
|
|
|
|
- return new CQueryAbstract.CQArray<>(source);
|
|
|
|
|
|
|
+ public final <T extends F> CQuery<T> array(CheckedSupplier<T[], ?> source) {
|
|
|
|
|
+ return new CQueryAbstract.CQArray<>(source::$get);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public final <T extends F,P> CQuery<T> array(P param, Function<? super P, T[]> source) {
|
|
|
|
|
|
|
+ public final <T extends F,P> CQuery<T> array(P param, CheckedFunction<? super P, T[], ?> source) {
|
|
|
return array(() -> source.apply(param));
|
|
return array(() -> source.apply(param));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public final <T extends F> CQuery<T> query(Supplier<CQuery<T>> source) {
|
|
|
|
|
- return new CQueryAbstract.CQQuery<>(source);
|
|
|
|
|
|
|
+ public final <T extends F> CQuery<T> query(CheckedSupplier<CQuery<T>, ?> source) {
|
|
|
|
|
+ return new CQueryAbstract.CQQuery<>(source::$get);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public final <T extends F,P> CQuery<T> query(P param, Function<? super P, CQuery<T>> source) {
|
|
|
|
|
|
|
+ public final <T extends F,P> CQuery<T> query(P param, CheckedFunction<? super P, CQuery<T>, ?> source) {
|
|
|
return query(() -> source.apply(param));
|
|
return query(() -> source.apply(param));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public final <T extends F> CQuery<T> infinite(Supplier<T> source) {
|
|
|
|
|
- return iterable(() -> IteratorUtils.infinite(source::get));
|
|
|
|
|
|
|
+ public final <T extends F> CQuery<T> infinite(CheckedSupplier<T, ?> source) {
|
|
|
|
|
+ return iterable(() -> IteratorUtils.infinite(source));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public final <T extends F> CQuery<T> finite(Supplier<Optional<T>> source) {
|
|
|
|
|
- return iterable(() -> IteratorUtils.finite(source::get));
|
|
|
|
|
|
|
+ public final <T extends F> CQuery<T> finite(CheckedSupplier<Optional<T>, ?> source) {
|
|
|
|
|
+ return iterable(() -> IteratorUtils.finite(source));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -296,12 +296,12 @@ public interface CQuery<T> extends Iterable<T> {
|
|
|
return self();
|
|
return self();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public <T extends F> Builder<T> withQuery(Supplier<CQuery<T>> item) {
|
|
|
|
|
|
|
+ public <T extends F> Builder<T> withQuery(CheckedSupplier<CQuery<T>,?> item) {
|
|
|
list.add(from().query(item));
|
|
list.add(from().query(item));
|
|
|
return self();
|
|
return self();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public <T extends F, P> Builder<T> withQuery(P param, Function<? super P, CQuery<T>> item) {
|
|
|
|
|
|
|
+ public <T extends F, P> Builder<T> withQuery(P param, CheckedFunction<? super P, CQuery<T>, ?> item) {
|
|
|
list.add(from().query(param,item));
|
|
list.add(from().query(param,item));
|
|
|
return self();
|
|
return self();
|
|
|
}
|
|
}
|
|
@@ -310,11 +310,11 @@ public interface CQuery<T> extends Iterable<T> {
|
|
|
return withQuery(from().iterable(f));
|
|
return withQuery(from().iterable(f));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public <T extends F> Builder<T> withIterable(Supplier<Iterable<T>> f) {
|
|
|
|
|
|
|
+ public <T extends F> Builder<T> withIterable(CheckedSupplier<Iterable<T>, ?> f) {
|
|
|
return withQuery(from().iterable(f));
|
|
return withQuery(from().iterable(f));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public <T extends F, P> Builder<T> withIterable(P param, Function<? super P,Iterable<T>> f) {
|
|
|
|
|
|
|
+ public <T extends F, P> Builder<T> withIterable(P param, CheckedFunction<? super P,Iterable<T>, ?> f) {
|
|
|
return withQuery(from().iterable(param, f));
|
|
return withQuery(from().iterable(param, f));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -322,11 +322,11 @@ public interface CQuery<T> extends Iterable<T> {
|
|
|
return withQuery(from().collection(f));
|
|
return withQuery(from().collection(f));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public <T extends F> Builder<T> withCollection(Supplier<Collection<T>> f) {
|
|
|
|
|
|
|
+ public <T extends F> Builder<T> withCollection(CheckedSupplier<Collection<T>, ?> f) {
|
|
|
return withQuery(from().collection(f));
|
|
return withQuery(from().collection(f));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public <T extends F, P> Builder<T> withCollection(P param, Function<? super P, Collection<T>> f) {
|
|
|
|
|
|
|
+ public <T extends F, P> Builder<T> withCollection(P param, CheckedFunction<? super P, Collection<T>, ?> f) {
|
|
|
return withQuery(from().collection(param, f));
|
|
return withQuery(from().collection(param, f));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -334,11 +334,11 @@ public interface CQuery<T> extends Iterable<T> {
|
|
|
return withQuery(from().array(f));
|
|
return withQuery(from().array(f));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public <T extends F> Builder<T> withArray(Supplier<T[]> f) {
|
|
|
|
|
|
|
+ public <T extends F> Builder<T> withArray(CheckedSupplier<T[], ?> f) {
|
|
|
return withQuery(from().array(f));
|
|
return withQuery(from().array(f));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public <T extends F, P> Builder<T> withArray(P param, Function<? super P, T[]> f) {
|
|
|
|
|
|
|
+ public <T extends F, P> Builder<T> withArray(P param, CheckedFunction<? super P, T[], ?> f) {
|
|
|
return withQuery(from().array(param, f));
|
|
return withQuery(from().array(param, f));
|
|
|
}
|
|
}
|
|
|
|
|
|