Class NotP<V>
java.lang.Object
org.apache.tinkerpop.gremlin.process.traversal.P<V>
org.apache.tinkerpop.gremlin.process.traversal.NotP<V>
- All Implemented Interfaces:
Serializable,Cloneable,Predicate<V>
A NotP wraps a P and represents its negation. This class provides the logical NOT operation
for predicates, inverting the result of the wrapped predicate's test method.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA NotPBiPredicate wraps a PBiPredicate and represents its negation. -
Field Summary
Fields inherited from class org.apache.tinkerpop.gremlin.process.traversal.P
biPredicate, literals, variables -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()getValue()Gets the current value to be passed to the predicate for testing.Returns the inner predicate wrapped by this NotP.booleanDetermines if this predicate holds a child traversal whose result is resolved at runtime.booleanReturnstrueif the most recent call toP.resolve(Traverser.Admin)produced no results for a scalar predicate, meaning there is no meaningful comparison value.negate()Returns the original unwrapped P, since double negation cancels out.voidresolve(Traverser.Admin<?> traverser) Resolves the child traversal(s) against the given traverser, replacing the traversal value with the resolved literal(s) for this test cycle.voidtoString()Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.P
and, between, between, collectTraversals, eq, eq, eq, equals, getBiPredicate, getChildTraversals, getGValues, getPredicateName, gt, gt, gt, gte, gte, gte, hashCode, inside, inside, isParameterized, lt, lt, lt, lte, lte, lte, neq, neq, neq, not, or, outside, outside, test, test, typeOf, typeOf, typeOf, updateVariable, within, within, within, within, within, without, without, without, without, without
-
Constructor Details
-
NotP
-
-
Method Details
-
getValue
Gets the current value to be passed to the predicate for testing. -
setValue
-
toString
-
getWrapped
Returns the inner predicate wrapped by this NotP. -
negate
Returns the original unwrapped P, since double negation cancels out. -
clone
-
hasTraversal
public boolean hasTraversal()Description copied from class:PDetermines if this predicate holds a child traversal whose result is resolved at runtime.- Overrides:
hasTraversalin classP<V>
-
isResolvedEmpty
public boolean isResolvedEmpty()Description copied from class:PReturnstrueif the most recent call toP.resolve(Traverser.Admin)produced no results for a scalar predicate, meaning there is no meaningful comparison value.- Overrides:
isResolvedEmptyin classP<V>
-
resolve
Description copied from class:PResolves the child traversal(s) against the given traverser, replacing the traversal value with the resolved literal(s) for this test cycle. If no traversal is present, this method returns immediately.
-