Class FieldType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<FieldType>

    public class FieldType
    extends java.lang.Object
    implements java.io.Serializable, java.lang.Comparable<FieldType>
    See Also:
    Serialized Form
    • Field Detail

      • TYPE_

        public static final Name TYPE_
        Name of the openGql.grammar.FieldType type.
      • FIELD_NAME

        public static final Name FIELD_NAME
        Name of the openGql.grammar.FieldType.fieldName field.
      • TYPED

        public static final Name TYPED
        Name of the openGql.grammar.FieldType.typed field.
      • VALUE_TYPE

        public static final Name VALUE_TYPE
        Name of the openGql.grammar.FieldType.valueType field.
      • fieldName

        public final java.lang.String fieldName
      • typed

        public final Optional<java.lang.Void> typed
      • valueType

        public final ValueType valueType
    • Constructor Detail

      • FieldType

        public FieldType​(java.lang.String fieldName,
                         Optional<java.lang.Void> typed,
                         ValueType valueType)
        Constructs an immutable FieldType.
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • compareTo

        public int compareTo​(FieldType other)
        Specified by:
        compareTo in interface java.lang.Comparable<FieldType>
      • withFieldName

        public FieldType withFieldName​(java.lang.String fieldName)
        Returns a copy of this FieldType with fieldName replaced.
      • withTyped

        public FieldType withTyped​(Optional<java.lang.Void> typed)
        Returns a copy of this FieldType with typed replaced.