Enum ScalarFieldType

    • Method Detail

      • values

        public static ScalarFieldType[] 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 (ScalarFieldType c : ScalarFieldType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ScalarFieldType 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
      • getByName

        public static ScalarFieldType getByName​(String name)
        Get scalar type by its reference/name. Scalar type names are:

        1. int32
        2. int64
        3. uint32
        4. uint64
        5. sint32
        6. sint64
        7. fixed32
        8. fixed64
        9. sfixed32
        10. sfixed64
        11. float
        12. double
        13. bool
        14. string
        15. bytes
      • getFullyQualifiedName

        public String getFullyQualifiedName()
        Description copied from interface: FieldType
        Type reference. For scalar types, it returns one of:

        1. int32
        2. int64
        3. uint32
        4. uint64
        5. sint32
        6. sint64
        7. fixed32
        8. fixed64
        9. sfixed32
        10. sfixed64
        11. float
        12. double
        13. bool
        14. string
        15. bytes

        For messages, it is full massage name. For enums, it is full enum name.

        Specified by:
        getFullyQualifiedName in interface FieldType
        Specified by:
        getFullyQualifiedName in interface Type
      • isScalar

        public boolean isScalar()
        Description copied from interface: FieldType
        Test if this type is scalar.
        Specified by:
        isScalar in interface FieldType
      • isEnum

        public boolean isEnum()
        Description copied from interface: FieldType
        Test if this type is enum.
        Specified by:
        isEnum in interface FieldType
      • isMessage

        public boolean isMessage()
        Description copied from interface: FieldType
        Test if this type is message.
        Specified by:
        isMessage in interface FieldType
      • isMap

        public boolean isMap()
        Description copied from interface: FieldType
        Test if this type is map.
        Specified by:
        isMap in interface FieldType
      • isString

        public boolean isString()
      • isBytes

        public boolean isBytes()