Repository: tinkerpop Updated Branches: refs/heads/master 9f13e6985 -> 268333b47
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/master Commit: e6dd6c451ff805614ee22ec8372c2a1bfa2ae797 Parents: b9a439a Author: Stephen Mallette <[email protected]> Authored: Tue Jun 20 12:24:39 2017 -0400 Committer: Stephen Mallette <[email protected]> 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;
