java.lang.Object
org.apache.tinkerpop.gremlin.process.traversal.P<org.apache.tinkerpop.gremlin.structure.geo.Geometry>
org.apache.tinkerpop.gremlin.process.traversal.GeoP
All Implemented Interfaces:
Serializable, Cloneable, Predicate<org.apache.tinkerpop.gremlin.structure.geo.Geometry>

public class GeoP extends P<org.apache.tinkerpop.gremlin.structure.geo.Geometry>
Predefined Predicate values that filter Geometry values by a spatial relationship, backed by the Geo predicates.

An argument may instead come from a child traversal, which is resolved against each traverser. An argument may also be a GValue, whose value is resolved when the traversal is built.

Accuracy in the geographic model. Shapes are related in longitude and latitude, with edges straight in both, so the predicates hold for edges under about 100 km that cross neither the antimeridian nor a pole.

Since:
4.0.0
See Also:
  • Constructor Details

    • GeoP

      public GeoP(PBiPredicate<Object,Object> biPredicate, Object value)
      Constructs a GeoP from the given geometry, which is validated as a constant. A geometry resolved at runtime is given as a child traversal instead.
      Since:
      4.0.0
    • GeoP

      public GeoP(PBiPredicate<Object,Object> biPredicate, Traversal.Admin<?,?> traversalValue)
      Constructs a GeoP with a child traversal whose result is resolved at runtime against the current traverser.
      Since:
      4.0.0
    • GeoP

      public GeoP(PBiPredicate<Object,Object> biPredicate, org.apache.tinkerpop.gremlin.process.traversal.step.GValue<?> value)
      Constructs a GeoP from a variable, whose value is validated once it is resolved.
      Since:
      4.0.0
  • Method Details

    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class P<org.apache.tinkerpop.gremlin.structure.geo.Geometry>
    • negate

      public P<org.apache.tinkerpop.gremlin.structure.geo.Geometry> negate()
      Specified by:
      negate in interface Predicate<org.apache.tinkerpop.gremlin.structure.geo.Geometry>
      Overrides:
      negate in class P<org.apache.tinkerpop.gremlin.structure.geo.Geometry>
    • clone

      public GeoP clone()
      Overrides:
      clone in class P<org.apache.tinkerpop.gremlin.structure.geo.Geometry>
    • updateVariable

      public void updateVariable(String name, Object value)

      A new value for one of this predicate's variables is validated as the same value given to a constructor would be, before it is kept.

      Overrides:
      updateVariable in class P<org.apache.tinkerpop.gremlin.structure.geo.Geometry>
    • validateValue

      protected void validateValue(Object value)
      Checks a value before P.setValue(Object) replaces the predicate's value state with it, so that a subclass can reject a value it cannot hold. It accepts every value by default. The value is typed as an Object because setValue is also given child traversals, including by the constructors.

      A value other than a child traversal is validated as the same value given to a constructor would be.

      Overrides:
      validateValue in class P<org.apache.tinkerpop.gremlin.structure.geo.Geometry>
    • geoWithin

      public static GeoP geoWithin(org.apache.tinkerpop.gremlin.structure.geo.Geometry value)
      Determines if a geometry lies entirely inside the given geometry. A value that lies only on the given geometry's boundary is not within it.
      Since:
      4.0.0
    • geoWithin

      public static GeoP geoWithin(org.apache.tinkerpop.gremlin.process.traversal.step.GValue<org.apache.tinkerpop.gremlin.structure.geo.Geometry> value)
      Determines if a geometry lies entirely inside the geometry a variable holds.
      Since:
      4.0.0
    • geoWithin

      public static GeoP geoWithin(Traversal<?,?> traversalValue)
      Determines if a geometry lies entirely inside the geometry resolved from a child traversal at runtime.
      Since:
      4.0.0
    • geoContains

      public static GeoP geoContains(org.apache.tinkerpop.gremlin.structure.geo.Geometry value)
      Determines if a geometry entirely contains the given geometry. A geometry does not contain a value that lies only on its boundary.
      Since:
      4.0.0
    • geoContains

      public static GeoP geoContains(org.apache.tinkerpop.gremlin.process.traversal.step.GValue<org.apache.tinkerpop.gremlin.structure.geo.Geometry> value)
      Determines if a geometry entirely contains the geometry a variable holds.
      Since:
      4.0.0
    • geoContains

      public static GeoP geoContains(Traversal<?,?> traversalValue)
      Determines if a geometry entirely contains the geometry resolved from a child traversal at runtime.
      Since:
      4.0.0