Cole-Greer commented on code in PR #3154:
URL: https://github.com/apache/tinkerpop/pull/3154#discussion_r2226728991


##########
docs/src/reference/the-traversal.asciidoc:
##########
@@ -804,6 +804,27 @@ 
g.V().hasLabel('person').values('age').fold().asString(local) <3>
 
link:++https://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#asString()++[`asString()`]
 
link:++https://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#asString(org.apache.tinkerpop.gremlin.process.traversal.Scope)++[`asString(Scope)`]
 
+[[asBool-step]]
+=== AsBool Step
+
+The `asBool()`-step (*map*) converts the incoming traverser to a boolean 
value. Numbers evaluate to
+`true` when non-zero (and not `NaN`). Strings are only accepted when
+equal to `"true"` or `"false"` (case-insensitive), otherwise an 
`IllegalArgumentException` is thrown.
+All other types (including `null`) will throw an `IllegalArgumentException`.

Review Comment:
   ```suggestion
   The `asBool()`-step (*map*) converts the incoming traverser to a boolean 
value. If the traverser is
   already a boolean value, it is passed as-is. Numbers evaluate to
   `true` when non-zero (and not `NaN`). Strings are only accepted when
   equal to `"true"` or `"false"` (case-insensitive), otherwise an 
`IllegalArgumentException` is thrown.
   All other types (including `null`) will throw an `IllegalArgumentException`.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to