Enum Class FieldType

java.lang.Object
java.lang.Enum<FieldType>
org.apache.nifi.repository.schema.FieldType
All Implemented Interfaces:
Serializable, Comparable<FieldType>, Constable

public enum FieldType extends Enum<FieldType>
  • Enum Constant Details

    • STRING

      public static final FieldType STRING
    • LONG_STRING

      public static final FieldType LONG_STRING
    • BOOLEAN

      public static final FieldType BOOLEAN
    • LONG

      public static final FieldType LONG
    • INT

      public static final FieldType INT
    • BYTE_ARRAY

      public static final FieldType BYTE_ARRAY
    • COMPLEX

      public static final FieldType COMPLEX
    • MAP

      public static final FieldType MAP
    • UNION

      public static final FieldType UNION
  • Field Details

    • numBytes

      private final int numBytes
    • lengthEncoded

      private final boolean lengthEncoded
    • javaClass

      private final Class<?> javaClass
  • Constructor Details

    • FieldType

      private FieldType(int numBytes, boolean lengthEncoded, Class<?> javaClass)
  • Method Details

    • values

      public static FieldType[] 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 FieldType 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
    • getNumberOfBytes

      public int getNumberOfBytes()
      Indicates the number of bytes that must be read for this field. If this field is length-encoded (see isLengthEncoded(), then this method tells us how many bytes to read in order to determine the full length of the field. Otherwise, these bytes tell us the full length of the field themselves.
      Returns:
      the number of bytes to read for this field
    • isLengthEncoded

      public boolean isLengthEncoded()
      This method returns true, then the value of getNumberOfBytes() tells us how many bytes to read in order to determine the full length of the field (if the field is not complex) or the number of sub-fields to read in order to determine the full field (if this field is complex). If false, the value of getNumberOfBytes() simply tells us how many bytes must be read in order to read the entire field.
      Returns:
      whether or not the field is length-encoded.
    • getJavaClass

      public Class<?> getJavaClass()
      Returns:
      the Java type that corresponds to this FieldType