Enum GType

  • All Implemented Interfaces:
    Serializable, Comparable<GType>

    public enum GType
    extends Enum<GType>
    Enumeration of Gremlin data types used for type checking and filtering operations.

    Each GType constant represents a specific Java type that can be encountered during graph traversals. This enum is primarily used with the typeOf() predicate to filter values based on their runtime type.

    Usage Examples:

    
     // Filter vertices by checking property types
     g.V().has("age", P.typeOf(GType.INT))
     
     // Filter values by string type
     g.V().values("name").is(P.typeOf(GType.STRING))
     
     // Check for numeric types
     g.V().values().is(P.typeOf(GType.NUMBER))
     
    Since:
    3.8.0
    See Also:
    P.typeOf(GType)
    • Enum Constant Detail

      • BIGDECIMAL

        public static final GType BIGDECIMAL
      • BIGINT

        public static final GType BIGINT
      • BINARY

        public static final GType BINARY
      • BOOLEAN

        public static final GType BOOLEAN
      • BYTE

        public static final GType BYTE
      • CHAR

        public static final GType CHAR
      • DATETIME

        public static final GType DATETIME
      • DOUBLE

        public static final GType DOUBLE
      • DURATION

        public static final GType DURATION
      • EDGE

        public static final GType EDGE
      • FLOAT

        public static final GType FLOAT
      • GRAPH

        public static final GType GRAPH
      • INT

        public static final GType INT
      • LIST

        public static final GType LIST
      • LONG

        public static final GType LONG
      • MAP

        public static final GType MAP
      • NULL

        public static final GType NULL
      • NUMBER

        public static final GType NUMBER
      • PATH

        public static final GType PATH
      • PROPERTY

        public static final GType PROPERTY
      • SET

        public static final GType SET
      • SHORT

        public static final GType SHORT
      • STRING

        public static final GType STRING
      • TREE

        public static final GType TREE
      • UUID

        public static final GType UUID
      • VERTEX

        public static final GType VERTEX
      • VPROPERTY

        public static final GType VPROPERTY
    • Method Detail

      • values

        public static GType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (GType c : GType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static GType valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        NullPointerException - if the argument is null
      • getType

        public Class<?> getType()
      • isNumeric

        public boolean isNumeric()
      • getType

        public static Class<?> getType​(String name)