tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dkupp...@apache.org
Subject tinkerpop git commit: renamed text predicates and added some javadoc comments
Date Tue, 02 Oct 2018 20:11:30 GMT
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-2041 a6571c39a -> a2211c2c5


renamed text predicates and added some javadoc comments


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

Branch: refs/heads/TINKERPOP-2041
Commit: a2211c2c5b991e835426672b712866aea5eb953c
Parents: a6571c3
Author: Daniel Kuppitz <daniel_kuppitz@hotmail.com>
Authored: Tue Oct 2 13:11:23 2018 -0700
Committer: Daniel Kuppitz <daniel_kuppitz@hotmail.com>
Committed: Tue Oct 2 13:11:23 2018 -0700

----------------------------------------------------------------------
 docs/src/reference/the-traversal.asciidoc       | 12 +--
 docs/src/upgrade/release-3.4.x.asciidoc         |  4 +-
 .../gremlin/process/traversal/Text.java         | 78 ++++++++++++++------
 .../gremlin/process/traversal/TextP.java        | 28 +++----
 .../gremlin/process/traversal/PTest.java        | 28 +++----
 .../GraphSONMapperPartialEmbeddedTypeTest.java  | 10 +--
 .../src/Gremlin.Net/Process/Traversal/TextP.cs  | 24 +++---
 .../TraversalEvaluation/TextPParameter.cs       |  2 +-
 gremlin-javascript/glv/TraversalSource.template |  4 +-
 .../gremlin-javascript/lib/process/traversal.js | 26 +++----
 .../jython/gremlin_python/process/traversal.py  | 60 +++++++--------
 gremlin-test/features/filter/Has.feature        | 20 ++---
 .../process/traversal/step/filter/HasTest.java  | 50 ++++++-------
 13 files changed, 191 insertions(+), 155 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a2211c2c/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc
index fdd261a..85dc1c0 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -3376,12 +3376,12 @@ The provided predicates are outlined in the table below and are used
in various
 | `P.between(number,number)` | Is the incoming number greater than or equal to the first
provided number and less than the second?
 | `P.within(objects...)` | Is the incoming object in the array of provided objects?
 | `P.without(objects...)` | Is the incoming object not in the array of the provided objects?
-| `TextP.startsWith(string)` | Does the incoming `String` start with the provided `String`?
-| `TextP.endsWith(string)` | Does the incoming `String` end with the provided `String`?
-| `TextP.contains(string)` | Does the incoming `String` contain the provided `String`?
-| `TextP.startsNotWith(string)` | TODO: find a better name
-| `TextP.endsNotWith(string)` | TODO: find a better name
-| `TextP.absent(string)` | TODO: find a better name
+| `TextP.startingWith(string)` | Does the incoming `String` start with the provided `String`?
+| `TextP.endingWith(string)` | Does the incoming `String` end with the provided `String`?
+| `TextP.containing(string)` | Does the incoming `String` contain the provided `String`?
+| `TextP.notStartingWith(string)` | Does the incoming `String` not start with the provided
`String`?
+| `TextP.notEndingWith(string)` | Does the incoming `String` not end with the provided `String`?
+| `TextP.notContaining(string)` | Does the incoming `String` not contain the provided `String`?
 |=========================================================
 
 [gremlin-groovy]

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a2211c2c/docs/src/upgrade/release-3.4.x.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.4.x.asciidoc b/docs/src/upgrade/release-3.4.x.asciidoc
index b338802..766926f 100644
--- a/docs/src/upgrade/release-3.4.x.asciidoc
+++ b/docs/src/upgrade/release-3.4.x.asciidoc
@@ -35,10 +35,10 @@ Gremlin now supports simple text predicates on top of the existing `P`
predicate
 
 [source,groovy]
 ----
-gremlin> g.V().has("person","name", contains("o")).valueMap()
+gremlin> g.V().has("person","name", containing("o")).valueMap()
 ==>[name:[marko],age:[29]]
 ==>[name:[josh],age:[32]]
-gremlin> g.V().has("person","name", contains("o").and(gte("j").and(endsWith("ko")))).valueMap()
+gremlin> g.V().has("person","name", containing("o").and(gte("j").and(endingWith("ko")))).valueMap()
 ==>[name:[marko],age:[29]]
 ----
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a2211c2c/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Text.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Text.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Text.java
index 5169309..9c25825 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Text.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Text.java
@@ -21,97 +21,131 @@ package org.apache.tinkerpop.gremlin.process.traversal;
 import java.util.function.BiPredicate;
 
 /**
+ * {@link Text} is a {@link java.util.function.BiPredicate} that determines whether the first
string starts with, starts
+ * not with, ends with, ends not with, contains or does not contain the second string argument.
+ *
  * @author Daniel Kuppitz (http://gremlin.guru)
+ * @since 3.4.0
  */
 public enum Text implements BiPredicate<String, String> {
 
-    startsWith {
+    /**
+     * Evaluates if the first string starts with the second.
+     *
+     * @since 3.4.0
+     */
+    startingWith {
         @Override
         public boolean test(final String value, final String prefix) {
             return value.startsWith(prefix);
         }
 
         /**
-         * The negative of {@code startsWith} is {@link #startsNotWith}.
+         * The negative of {@code startsWith} is {@link #notStartingWith}.
          */
         @Override
         public Text negate() {
-            return startsNotWith;
+            return notStartingWith;
         }
     },
 
-    startsNotWith {
+    /**
+     * Evaluates if the first string does not start with the second.
+     *
+     * @since 3.4.0
+     */
+    notStartingWith {
         @Override
         public boolean test(final String value, final String prefix) {
-            return !startsWith.test(value, prefix);
+            return !startingWith.test(value, prefix);
         }
 
         /**
-         * The negative of {@code startsNotWith} is {@link #startsWith}.
+         * The negative of {@code startsNotWith} is {@link #startingWith}.
          */
         @Override
         public Text negate() {
-            return startsWith;
+            return startingWith;
         }
     },
 
-    endsWith {
+    /**
+     * Evaluates if the first string ends with the second.
+     *
+     * @since 3.4.0
+     */
+    endingWith {
         @Override
         public boolean test(final String value, final String suffix) {
             return value.endsWith(suffix);
         }
 
         /**
-         * The negative of {@code endsWith} is {@link #endsNotWith}.
+         * The negative of {@code endsWith} is {@link #notEndingWith}.
          */
         @Override
         public Text negate() {
-            return endsNotWith;
+            return notEndingWith;
         }
     },
 
-    endsNotWith {
+    /**
+     * Evaluates if the first string does not end with the second.
+     *
+     * @since 3.4.0
+     */
+    notEndingWith {
         @Override
         public boolean test(final String value, final String prefix) {
-            return !endsWith.test(value, prefix);
+            return !endingWith.test(value, prefix);
         }
 
         /**
-         * The negative of {@code endsNotWith} is {@link #endsWith}.
+         * The negative of {@code endsNotWith} is {@link #endingWith}.
          */
         @Override
         public Text negate() {
-            return endsWith;
+            return endingWith;
         }
     },
 
-    contains {
+    /**
+     * Evaluates if the first string contains the second.
+     *
+     * @since 3.4.0
+     */
+    containing {
         @Override
         public boolean test(final String value, final String search) {
             return value.contains(search);
         }
 
         /**
-         * The negative of {@code contains} is {@link #absent}.
+         * The negative of {@code contains} is {@link #notContaining}.
          */
         @Override
         public Text negate() {
-            return absent;
+            return notContaining;
         }
     },
 
-    absent{
+    /**
+     * Evaluates if the first string does not contain the second.
+     *
+     * @since 3.4.0
+     */
+    notContaining {
         @Override
         public boolean test(final String value, final String search) {
-            return !contains.test(value, search);
+            return !containing.test(value, search);
         }
 
         /**
-         * The negative of {@code absent} is {@link #contains}.
+         * The negative of {@code absent} is {@link #containing}.
          */
         @Override
         public Text negate() {
-            return contains;
+            return containing;
         }
     };
 
@@ -120,4 +154,4 @@ public enum Text implements BiPredicate<String, String> {
      */
     @Override
     public abstract Text negate();
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a2211c2c/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TextP.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TextP.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TextP.java
index 2b1b976..2c28853 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TextP.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TextP.java
@@ -21,6 +21,8 @@ package org.apache.tinkerpop.gremlin.process.traversal;
 import java.util.function.BiPredicate;
 
 /**
+ * Predefined {@code Predicate} values that can be used as {@code String} filters.
+ *
  * @author Daniel Kuppitz (http://gremlin.guru)
  */
 public class TextP extends P<String> {
@@ -56,8 +58,8 @@ public class TextP extends P<String> {
      *
      * @since 3.4.0
      */
-    public static TextP startsWith(final String value) {
-        return new TextP(Text.startsWith, value);
+    public static TextP startingWith(final String value) {
+        return new TextP(Text.startingWith, value);
     }
 
     /**
@@ -65,8 +67,8 @@ public class TextP extends P<String> {
      *
      * @since 3.4.0
      */
-    public static TextP startsNotWith(final String value) {
-        return new TextP(Text.startsNotWith, value);
+    public static TextP notStartingWith(final String value) {
+        return new TextP(Text.notStartingWith, value);
     }
 
     /**
@@ -74,8 +76,8 @@ public class TextP extends P<String> {
      *
      * @since 3.4.0
      */
-    public static TextP endsWith(final String value) {
-        return new TextP(Text.endsWith, value);
+    public static TextP endingWith(final String value) {
+        return new TextP(Text.endingWith, value);
     }
 
     /**
@@ -83,8 +85,8 @@ public class TextP extends P<String> {
      *
      * @since 3.4.0
      */
-    public static TextP endsNotWith(final String value) {
-        return new TextP(Text.endsNotWith, value);
+    public static TextP notEndingWith(final String value) {
+        return new TextP(Text.notEndingWith, value);
     }
 
     /**
@@ -92,8 +94,8 @@ public class TextP extends P<String> {
      *
      * @since 3.4.0
      */
-    public static TextP contains(final String value) {
-        return new TextP(Text.contains, value);
+    public static TextP containing(final String value) {
+        return new TextP(Text.containing, value);
     }
 
     /**
@@ -101,7 +103,7 @@ public class TextP extends P<String> {
      *
      * @since 3.4.0
      */
-    public static TextP absent(final String value) {
-        return new TextP(Text.absent, value);
+    public static TextP notContaining(final String value) {
+        return new TextP(Text.notContaining, value);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a2211c2c/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/PTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/PTest.java
b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/PTest.java
index 0e21ece..686fd0e 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/PTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/PTest.java
@@ -95,20 +95,20 @@ public class PTest {
                     {P.between("m", "n").or(P.eq("daniel")), "daniel", true},
                     {P.between("m", "n").or(P.eq("daniel")), "stephen", false},
                     // text predicates
-                    {TextP.contains("ark"), "marko", true},
-                    {TextP.contains("ark"), "josh", false},
-                    {TextP.startsWith("jo"), "marko", false},
-                    {TextP.startsWith("jo"), "josh", true},
-                    {TextP.endsWith("ter"), "marko", false},
-                    {TextP.endsWith("ter"), "peter", true},
-                    {TextP.contains("o"), "marko", true},
-                    {TextP.contains("o"), "josh", true},
-                    {TextP.contains("o").and(P.gte("j")), "marko", true},
-                    {TextP.contains("o").and(P.gte("j")), "josh", true},
-                    {TextP.contains("o").and(P.gte("j")).and(TextP.endsWith("ko")), "marko",
true},
-                    {TextP.contains("o").and(P.gte("j")).and(TextP.endsWith("ko")), "josh",
false},
-                    {TextP.contains("o").and(P.gte("j").and(TextP.endsWith("ko"))), "marko",
true},
-                    {TextP.contains("o").and(P.gte("j").and(TextP.endsWith("ko"))), "josh",
false},
+                    {TextP.containing("ark"), "marko", true},
+                    {TextP.containing("ark"), "josh", false},
+                    {TextP.startingWith("jo"), "marko", false},
+                    {TextP.startingWith("jo"), "josh", true},
+                    {TextP.endingWith("ter"), "marko", false},
+                    {TextP.endingWith("ter"), "peter", true},
+                    {TextP.containing("o"), "marko", true},
+                    {TextP.containing("o"), "josh", true},
+                    {TextP.containing("o").and(P.gte("j")), "marko", true},
+                    {TextP.containing("o").and(P.gte("j")), "josh", true},
+                    {TextP.containing("o").and(P.gte("j")).and(TextP.endingWith("ko")), "marko",
true},
+                    {TextP.containing("o").and(P.gte("j")).and(TextP.endingWith("ko")), "josh",
false},
+                    {TextP.containing("o").and(P.gte("j").and(TextP.endingWith("ko"))), "marko",
true},
+                    {TextP.containing("o").and(P.gte("j").and(TextP.endingWith("ko"))), "josh",
false},
             }));
         }
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a2211c2c/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperPartialEmbeddedTypeTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperPartialEmbeddedTypeTest.java
b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperPartialEmbeddedTypeTest.java
index 92c4df6..9533353 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperPartialEmbeddedTypeTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapperPartialEmbeddedTypeTest.java
@@ -329,11 +329,11 @@ public class GraphSONMapperPartialEmbeddedTypeTest extends AbstractGraphSONTest
                 P.without(Arrays.asList(1,2,3,4)),
                 P.eq(1).and(P.eq(2)),
                 P.eq(1).or(P.eq(2)),
-                TextP.contains("ark"),
-                TextP.startsWith("mar"),
-                TextP.endsWith("ko"),
-                TextP.endsWith("ko").and(P.gte("mar")),
-                P.gte("mar").and(TextP.endsWith("ko")));
+                TextP.containing("ark"),
+                TextP.startingWith("mar"),
+                TextP.endingWith("ko"),
+                TextP.endingWith("ko").and(P.gte("mar")),
+                P.gte("mar").and(TextP.endingWith("ko")));
 
         for (P p : variantsOfP) {
             if (p instanceof TextP) {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a2211c2c/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TextP.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TextP.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TextP.cs
index b8e8a64..3047f75 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TextP.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TextP.cs
@@ -49,34 +49,34 @@ namespace Gremlin.Net.Process.Traversal
         }
 
 
-        public static TextP Absent(string value)
+        public static TextP Containing(string value)
         {
-            return new TextP("absent", value);
+            return new TextP("containing", value);
         }
 
-        public static TextP Contains(string value)
+        public static TextP EndingWith(string value)
         {
-            return new TextP("contains", value);
+            return new TextP("endingWith", value);
         }
 
-        public static TextP EndsNotWith(string value)
+        public static TextP NotContaining(string value)
         {
-            return new TextP("endsNotWith", value);
+            return new TextP("notContaining", value);
         }
 
-        public static TextP EndsWith(string value)
+        public static TextP NotEndingWith(string value)
         {
-            return new TextP("endsWith", value);
+            return new TextP("notEndingWith", value);
         }
 
-        public static TextP StartsNotWith(string value)
+        public static TextP NotStartingWith(string value)
         {
-            return new TextP("startsNotWith", value);
+            return new TextP("notStartingWith", value);
         }
 
-        public static TextP StartsWith(string value)
+        public static TextP StartingWith(string value)
         {
-            return new TextP("startsWith", value);
+            return new TextP("startingWith", value);
         }
 
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a2211c2c/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TextPParameter.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TextPParameter.cs
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TextPParameter.cs
index 5999659..198cd74 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TextPParameter.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TextPParameter.cs
@@ -31,7 +31,7 @@ using Gremlin.Net.Process.Traversal;
 namespace Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation
 {
     /// <summary>
-    /// Represents a parameter for a traversal predicate (ie: TextP.contains())
+    /// Represents a parameter for a traversal predicate (ie: TextP.containing())
     /// </summary>
     internal class TextPParameter : ITokenParameter, IEquatable<TextPParameter>
     {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a2211c2c/gremlin-javascript/glv/TraversalSource.template
----------------------------------------------------------------------
diff --git a/gremlin-javascript/glv/TraversalSource.template b/gremlin-javascript/glv/TraversalSource.template
index 46d96b5..cdbec26 100644
--- a/gremlin-javascript/glv/TraversalSource.template
+++ b/gremlin-javascript/glv/TraversalSource.template
@@ -194,12 +194,12 @@ class TextP {
 <% tpmethods.each{ method -> %>
   /** @param {...Object} args */
   static <%= toJs.call(method) %>(...args) {
-    return createTP('<%= method %>', args);
+    return createTextP('<%= method %>', args);
   }
 <% } %>
 }
 
-function createTP(operator, args) {
+function createTextP(operator, args) {
   args.unshift(null, operator);
   return new (Function.prototype.bind.apply(TextP, args));
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a2211c2c/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/traversal.js
----------------------------------------------------------------------
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/traversal.js
b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/traversal.js
index 89f8ddc..81853a6 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/traversal.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/traversal.js
@@ -341,38 +341,38 @@ class TextP {
   }
 
   /** @param {...Object} args */
-  static absent(...args) {
-    return createTP('absent', args);
+  static containing(...args) {
+    return createTextP('containing', args);
   }
 
   /** @param {...Object} args */
-  static contains(...args) {
-    return createTP('contains', args);
+  static endingWith(...args) {
+    return createTextP('endingWith', args);
   }
 
   /** @param {...Object} args */
-  static endsNotWith(...args) {
-    return createTP('endsNotWith', args);
+  static notContaining(...args) {
+    return createTextP('notContaining', args);
   }
 
   /** @param {...Object} args */
-  static endsWith(...args) {
-    return createTP('endsWith', args);
+  static notEndingWith(...args) {
+    return createTextP('notEndingWith', args);
   }
 
   /** @param {...Object} args */
-  static startsNotWith(...args) {
-    return createTP('startsNotWith', args);
+  static notStartingWith(...args) {
+    return createTextP('notStartingWith', args);
   }
 
   /** @param {...Object} args */
-  static startsWith(...args) {
-    return createTP('startsWith', args);
+  static startingWith(...args) {
+    return createTextP('startingWith', args);
   }
 
 }
 
-function createTP(operator, args) {
+function createTextP(operator, args) {
   args.unshift(null, operator);
   return new (Function.prototype.bind.apply(TextP, args));
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a2211c2c/gremlin-python/src/main/jython/gremlin_python/process/traversal.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/gremlin_python/process/traversal.py b/gremlin-python/src/main/jython/gremlin_python/process/traversal.py
index 7d7d518..c1458bc 100644
--- a/gremlin-python/src/main/jython/gremlin_python/process/traversal.py
+++ b/gremlin-python/src/main/jython/gremlin_python/process/traversal.py
@@ -327,28 +327,28 @@ class TextP(P):
         P.__init__(self, operator, value, other)
 
     @staticmethod
-    def absent(*args):
-        return TextP("absent", *args)
+    def containing(*args):
+        return TextP("containing", *args)
 
     @staticmethod
-    def contains(*args):
-        return TextP("contains", *args)
+    def endingWith(*args):
+        return TextP("endingWith", *args)
 
     @staticmethod
-    def endsNotWith(*args):
-        return TextP("endsNotWith", *args)
+    def notContaining(*args):
+        return TextP("notContaining", *args)
 
     @staticmethod
-    def endsWith(*args):
-        return TextP("endsWith", *args)
+    def notEndingWith(*args):
+        return TextP("notEndingWith", *args)
 
     @staticmethod
-    def startsNotWith(*args):
-        return TextP("startsNotWith", *args)
+    def notStartingWith(*args):
+        return TextP("notStartingWith", *args)
 
     @staticmethod
-    def startsWith(*args):
-        return TextP("startsWith", *args)
+    def startingWith(*args):
+        return TextP("startingWith", *args)
 
     def __eq__(self, other):
         return isinstance(other, self.__class__) and self.operator == other.operator and
self.value == other.value and self.other == other.other
@@ -356,29 +356,29 @@ class TextP(P):
     def __repr__(self):
         return self.operator + "(" + str(self.value) + ")" if self.other is None else self.operator
+ "(" + str(self.value) + "," + str(self.other) + ")"
 
-def absent(*args):
-    return TextP.absent(*args)
-statics.add_static('absent',absent)
+def containing(*args):
+    return TextP.containing(*args)
+statics.add_static('containing',containing)
 
-def contains(*args):
-    return TextP.contains(*args)
-statics.add_static('contains',contains)
+def endingWith(*args):
+    return TextP.endingWith(*args)
+statics.add_static('endingWith',endingWith)
 
-def endsNotWith(*args):
-    return TextP.endsNotWith(*args)
-statics.add_static('endsNotWith',endsNotWith)
+def notContaining(*args):
+    return TextP.notContaining(*args)
+statics.add_static('notContaining',notContaining)
 
-def endsWith(*args):
-    return TextP.endsWith(*args)
-statics.add_static('endsWith',endsWith)
+def notEndingWith(*args):
+    return TextP.notEndingWith(*args)
+statics.add_static('notEndingWith',notEndingWith)
 
-def startsNotWith(*args):
-    return TextP.startsNotWith(*args)
-statics.add_static('startsNotWith',startsNotWith)
+def notStartingWith(*args):
+    return TextP.notStartingWith(*args)
+statics.add_static('notStartingWith',notStartingWith)
 
-def startsWith(*args):
-    return TextP.startsWith(*args)
-statics.add_static('startsWith',startsWith)
+def startingWith(*args):
+    return TextP.startingWith(*args)
+statics.add_static('startingWith',startingWith)
 
 
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a2211c2c/gremlin-test/features/filter/Has.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/filter/Has.feature b/gremlin-test/features/filter/Has.feature
index e272c05..30fc4b3 100644
--- a/gremlin-test/features/filter/Has.feature
+++ b/gremlin-test/features/filter/Has.feature
@@ -559,55 +559,55 @@ Feature: Step - has()
       | result |
       | d[6].l |
 
-  Scenario: g_V_hasXname_containsXarkXX
+  Scenario: g_V_hasXname_containingXarkXX
     Given the modern graph
     And the traversal of
       """
-      g.V().has("name", TextP.contains("ark"))
+      g.V().has("name", TextP.containing("ark"))
       """
     When iterated to list
     Then the result should be unordered
       | result |
       | v[marko] |
 
-  Scenario: g_V_hasXname_startsWithXmarXX
+  Scenario: g_V_hasXname_startingWithXmarXX
     Given the modern graph
     And the traversal of
       """
-      g.V().has("name", TextP.startsWith("mar"))
+      g.V().has("name", TextP.startingWith("mar"))
       """
     When iterated to list
     Then the result should be unordered
       | result |
       | v[marko] |
 
-  Scenario: g_V_hasXname_endsWithXasXX
+  Scenario: g_V_hasXname_endingWithXasXX
     Given the modern graph
     And the traversal of
       """
-      g.V().has("name", TextP.endsWith("as"))
+      g.V().has("name", TextP.endingWith("as"))
       """
     When iterated to list
     Then the result should be unordered
       | result |
       | v[vadas] |
 
-  Scenario: g_V_hasXperson_name_containsXoX_andXltXmXXX
+  Scenario: g_V_hasXperson_name_containingXoX_andXltXmXXX
     Given the modern graph
     And the traversal of
       """
-      g.V().has("person", "name", TextP.contains("o").and(P.lt("m")))
+      g.V().has("person", "name", TextP.containing("o").and(P.lt("m")))
       """
     When iterated to list
     Then the result should be unordered
       | result |
       | v[josh] |
 
-  Scenario: g_V_hasXname_gtXmX_andXcontainsXoXXX
+  Scenario: g_V_hasXname_gtXmX_andXcontainingXoXXX
     Given the modern graph
     And the traversal of
       """
-      g.V().has("name", P.gt("m").and(TextP.contains("o")))
+      g.V().has("name", P.gt("m").and(TextP.containing("o")))
       """
     When iterated to list
     Then the result should be unordered

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a2211c2c/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
index 8f7d035..ce075da 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
@@ -126,15 +126,15 @@ public abstract class HasTest extends AbstractGremlinProcessTest {
 
     public abstract Traversal<Vertex, Long> get_g_V_hasXage_withoutX27_29X_count();
 
-    public abstract Traversal<Vertex, Vertex> get_g_V_hasXname_containsXarkXX();
+    public abstract Traversal<Vertex, Vertex> get_g_V_hasXname_containingXarkXX();
 
-    public abstract Traversal<Vertex,Vertex> get_g_V_hasXname_startsWithXmarXX();
+    public abstract Traversal<Vertex,Vertex> get_g_V_hasXname_startingWithXmarXX();
 
-    public abstract Traversal<Vertex,Vertex> get_g_V_hasXname_endsWithXasXX();
+    public abstract Traversal<Vertex,Vertex> get_g_V_hasXname_endingWithXasXX();
 
-    public abstract Traversal<Vertex,Vertex> get_g_V_hasXperson_name_containsXoX_andXltXmXXX();
+    public abstract Traversal<Vertex,Vertex> get_g_V_hasXperson_name_containingXoX_andXltXmXXX();
 
-    public abstract Traversal<Vertex,Vertex> get_g_V_hasXname_gtXmX_andXcontainsXoXXX();
+    public abstract Traversal<Vertex,Vertex> get_g_V_hasXname_gtXmX_andXcontainingXoXXX();
 
     @Test
     @LoadGraphWith(MODERN)
@@ -560,8 +560,8 @@ public abstract class HasTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_V_hasXname_containsXarkXX() {
-        final Traversal<Vertex, Vertex> traversal = get_g_V_hasXname_containsXarkXX();
+    public void g_V_hasXname_containingXarkXX() {
+        final Traversal<Vertex, Vertex> traversal = get_g_V_hasXname_containingXarkXX();
         printTraversalForm(traversal);
         assertTrue(traversal.hasNext());
         assertTrue(traversal.next().value("name").equals("marko"));
@@ -570,8 +570,8 @@ public abstract class HasTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_V_hasXname_startsWithXmarXX() {
-        final Traversal<Vertex, Vertex> traversal = get_g_V_hasXname_startsWithXmarXX();
+    public void g_V_hasXname_startingWithXmarXX() {
+        final Traversal<Vertex, Vertex> traversal = get_g_V_hasXname_startingWithXmarXX();
         printTraversalForm(traversal);
         assertTrue(traversal.hasNext());
         assertTrue(traversal.next().value("name").equals("marko"));
@@ -580,8 +580,8 @@ public abstract class HasTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_V_hasXname_endsWithXasXX() {
-        final Traversal<Vertex, Vertex> traversal = get_g_V_hasXname_endsWithXasXX();
+    public void g_V_hasXname_endingWithXasXX() {
+        final Traversal<Vertex, Vertex> traversal = get_g_V_hasXname_endingWithXasXX();
         printTraversalForm(traversal);
         assertTrue(traversal.hasNext());
         assertTrue(traversal.next().value("name").equals("vadas"));
@@ -590,8 +590,8 @@ public abstract class HasTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_V_hasXperson_name_containsXoX_andXltXmXXX() {
-        final Traversal<Vertex, Vertex> traversal = get_g_V_hasXperson_name_containsXoX_andXltXmXXX();
+    public void g_V_hasXperson_name_containingXoX_andXltXmXXX() {
+        final Traversal<Vertex, Vertex> traversal = get_g_V_hasXperson_name_containingXoX_andXltXmXXX();
         printTraversalForm(traversal);
         assertTrue(traversal.hasNext());
         assertTrue(traversal.next().value("name").equals("josh"));
@@ -600,8 +600,8 @@ public abstract class HasTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_V_hasXname_gtXmX_andXcontainsXoXXX() {
-        final Traversal<Vertex, Vertex> traversal = get_g_V_hasXname_gtXmX_andXcontainsXoXXX();
+    public void g_V_hasXname_gtXmX_andXcontainingXoXXX() {
+        final Traversal<Vertex, Vertex> traversal = get_g_V_hasXname_gtXmX_andXcontainingXoXXX();
         printTraversalForm(traversal);
         assertTrue(traversal.hasNext());
         assertTrue(traversal.next().value("name").equals("marko"));
@@ -790,28 +790,28 @@ public abstract class HasTest extends AbstractGremlinProcessTest {
         }
 
         @Override
-        public Traversal<Vertex, Vertex> get_g_V_hasXname_containsXarkXX() {
-            return g.V().has("name", TextP.contains("ark"));
+        public Traversal<Vertex, Vertex> get_g_V_hasXname_containingXarkXX() {
+            return g.V().has("name", TextP.containing("ark"));
         }
 
         @Override
-        public Traversal<Vertex, Vertex> get_g_V_hasXname_startsWithXmarXX() {
-            return g.V().has("name", TextP.startsWith("mar"));
+        public Traversal<Vertex, Vertex> get_g_V_hasXname_startingWithXmarXX() {
+            return g.V().has("name", TextP.startingWith("mar"));
         }
 
         @Override
-        public Traversal<Vertex, Vertex> get_g_V_hasXname_endsWithXasXX() {
-            return g.V().has("name", TextP.endsWith("as"));
+        public Traversal<Vertex, Vertex> get_g_V_hasXname_endingWithXasXX() {
+            return g.V().has("name", TextP.endingWith("as"));
         }
 
         @Override
-        public Traversal<Vertex, Vertex> get_g_V_hasXperson_name_containsXoX_andXltXmXXX()
{
-            return g.V().has("person","name", TextP.contains("o").and(P.lt("m")));
+        public Traversal<Vertex, Vertex> get_g_V_hasXperson_name_containingXoX_andXltXmXXX()
{
+            return g.V().has("person","name", TextP.containing("o").and(P.lt("m")));
         }
 
         @Override
-        public Traversal<Vertex, Vertex> get_g_V_hasXname_gtXmX_andXcontainsXoXXX()
{
-            return g.V().has("name", P.gt("m").and(TextP.contains("o")));
+        public Traversal<Vertex, Vertex> get_g_V_hasXname_gtXmX_andXcontainingXoXXX()
{
+            return g.V().has("name", P.gt("m").and(TextP.containing("o")));
         }
     }
 }
\ No newline at end of file


Mime
View raw message