Skip to content

Commit

Permalink
feat: Add iterable supplier to ObjectQuery construction.
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonStoldt committed Nov 5, 2023
1 parent 2d427ab commit 2ece7c9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/io/github/cbuschka/objset/ObjectQuery.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@

import io.github.cbuschka.objset.impl.UniSelectImpl;

import java.util.function.Supplier;

public class ObjectQuery {
public static <Element1> FilterableUniSelect<Element1> selectFrom(Iterable<Element1> elements) {
return new UniSelectImpl<>(elements);
}

public static <Element1> FilterableUniSelect<Element1> selectFrom(Supplier<Iterable<Element1>> elements) {
return new UniSelectImpl<>(elements.get());
}
}

0 comments on commit 2ece7c9

Please sign in to comment.