You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by dk...@apache.org on 2017/06/22 11:02:17 UTC

[44/48] tinkerpop git commit: TINKERPOP-920 Added more javadoc for getCardinality()

TINKERPOP-920 Added more javadoc for getCardinality()

Basically, users shouldn't rely on this method for determining a key's cardinality in production applications. This method is generally for internal use by TinkerPop (mostly for the test suite and other generalized functions) CTR


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/e6dd6c45
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/e6dd6c45
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/e6dd6c45

Branch: refs/heads/TINKERPOP-1682
Commit: e6dd6c451ff805614ee22ec8372c2a1bfa2ae797
Parents: b9a439a
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Jun 20 12:24:39 2017 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Jun 20 12:24:39 2017 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/tinkerpop/gremlin/structure/Graph.java | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e6dd6c45/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
index 1f59719..81bbed7 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
@@ -525,6 +525,11 @@ public interface Graph extends AutoCloseable, Host {
              * {@link VertexProperty.Cardinality#list}.  Implementations that employ a schema can consult it to
              * determine the {@link VertexProperty.Cardinality}.  Those that do no have a schema can return their
              * default {@link VertexProperty.Cardinality} for every key.
+             * <p/>
+             * Note that this method is primarily used by TinkerPop for internal usage and may not be suitable to
+             * reliably determine the cardinality of a key. For some implementation it may offer little more than a
+             * hint on the actual cardinality. Generally speaking it is likely best to drop down to the API of the
+             * {@link Graph} implementation for any schema related queries.
              */
             public default VertexProperty.Cardinality getCardinality(final String key) {
                 return VertexProperty.Cardinality.list;