You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2017/06/08 14:38:21 UTC
[3/9] jena git commit: JENA-1074: Add Graph.find(),
equivalent to find(ANY, ANY, ANY).
JENA-1074: Add Graph.find(), equivalent to find(ANY,ANY,ANY).
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/c25cbd8b
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/c25cbd8b
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/c25cbd8b
Branch: refs/heads/master
Commit: c25cbd8bd33cfb08c8a04d0b7f228b361be76f6c
Parents: 97e950e
Author: Andy Seaborne <an...@apache.org>
Authored: Sun Jun 4 09:41:11 2017 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Sun Jun 4 09:41:11 2017 +0100
----------------------------------------------------------------------
.../main/java/org/apache/jena/graph/Graph.java | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/c25cbd8b/jena-core/src/main/java/org/apache/jena/graph/Graph.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/graph/Graph.java b/jena-core/src/main/java/org/apache/jena/graph/Graph.java
index 0dd9ed3..ea39ddb 100644
--- a/jena-core/src/main/java/org/apache/jena/graph/Graph.java
+++ b/jena-core/src/main/java/org/apache/jena/graph/Graph.java
@@ -92,17 +92,25 @@ public interface Graph
/**
Returns an iterator over all the Triples that match the triple pattern.
- @param m a Triple[Match] encoding the pattern to look for
+ @param m a Triple encoding the pattern to look for
@return an iterator of all triples in this graph that match m
*/
ExtendedIterator<Triple> find(Triple m);
-
-/** Returns an iterator over Triple.
- */
- ExtendedIterator<Triple> find(Node s,Node p,Node o);
+ /** Returns an iterator over Triples matching a pattern.
+ *
+ * @return an iterator of all triples in this graph
+ */
+ ExtendedIterator<Triple> find(Node s, Node p, Node o);
- /**
+ /** Returns an iterator over all Triples in the graph.
+ * Equivalent to {@code find(Node.ANY, Node.ANY, Node.ANY)}
+ *
+ * @return an iterator of all triples in this graph
+ */
+ default ExtendedIterator<Triple> find() { return find(Node.ANY, Node.ANY, Node.ANY); }
+
+ /**
* Compare this graph with another using the method
* described in
* <a href="http://www.w3.org/TR/rdf-concepts#section-Graph-syntax">