Enum Class Direction

java.lang.Object
java.lang.Enum<Direction>
org.apache.tinkerpop.gremlin.structure.Direction
All Implemented Interfaces:
Serializable, Comparable<Direction>, Constable

public enum Direction extends Enum<Direction>
Direction is used to denote the direction of an Edge or location of a Vertex on an Edge. For example:

 gremlin--knows-->rexster
 
is an OUT Edge for Gremlin and an IN edge for Rexster. Moreover, given that Edge, Gremlin is the OUT Vertex and Rexster is the IN Vertex.
Author:
Marko A. Rodriguez (http://markorodriguez.com), Stephen Mallette (http://stephen.genoprime.com)
  • Enum Constant Details

    • OUT

      public static final Direction OUT
      Refers to an outgoing direction.
      Since:
      3.0.0-incubating
    • IN

      public static final Direction IN
      Refers to an incoming direction.
      Since:
      3.0.0-incubating
    • BOTH

      public static final Direction BOTH
      Refers to either direction (IN or OUT).
      Since:
      3.0.0-incubating
  • Field Details

    • proper

      public static final Direction[] proper
      The actual direction of an Edge may only be IN or OUT, as defined in this array.
      Since:
      3.0.0-incubating
    • from

      public static final Direction from
      Friendly alias to OUT
      Since:
      3.6.0
    • to

      public static final Direction to
      Friendly alias to IN
      Since:
      3.6.0
  • Method Details

    • values

      public static Direction[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Direction valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • opposite

      public Direction opposite()
      Produce the opposite representation of the current Direction enum.
    • directionValueOf

      public static Direction directionValueOf(String name)
      Get Direction from name.