Class DBaseFileField


  • public class DBaseFileField
    extends Object
    This class permits to store a field of a DBF file.

    No warranty for the files that are not generated by an ESRI software.

    Since:
    14.0
    Version:
    17.0 2020-01-04 14:41:52
    Author:
    Stéphane GALLAND, Olivier LAMOTTE
    Maven Group Id:
    org.arakhne.afc.advanced
    Maven Artifact Id:
    dbasefile
    • Constructor Detail

      • DBaseFileField

        DBaseFileField​(String name,
                       DBaseFieldType type)
        Constructor.
        Parameters:
        name - is the name of the field
        type - is the dBase type of the field
      • DBaseFileField

        public DBaseFileField​(String name,
                              DBaseFieldType type,
                              int length,
                              int decimal_pos,
                              int columnIndex)
        Constructor.
        Parameters:
        name - is the name of the field
        type - is the dBase type of the field
        length - is the size of the field
        decimal_pos - is the position of the decimal point, if any
        columnIndex - is the index of the column that corresponds to this field in the dBase file.
      • DBaseFileField

        public DBaseFileField​(String name,
                              DBaseFieldType type,
                              int length,
                              int decimal_pos)
        Constructor.
        Parameters:
        name - is the name of the field
        type - is the dBase type of the field
        length - is the size of the field
        decimal_pos - is the position of the decimal point, if any
    • Method Detail

      • isUnsetValue

        @Pure
        public static boolean isUnsetValue​(String value)
        Replies if the given value corresponds to an unset value inside the dBase file.
        Parameters:
        value - is the value to test.
        Returns:
        true if the given value stands for "unset value"; otherwise false.
      • getColumnIndex

        @Pure
        public int getColumnIndex()
        Replies the index of this column.
        Returns:
        the index of this column.
      • setColumnIndex

        void setColumnIndex​(int columnIndex)
        Set the index of this column.
        Parameters:
        columnIndex - the index.
      • equals

        @Pure
        public boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • hashCode

        @Pure
        public int hashCode()
        Overrides:
        hashCode in class Object
      • getName

        @Pure
        public String getName()
        Replies the name of the field.
        Returns:
        the name of the field.
      • getType

        @Pure
        public DBaseFieldType getType()
        Replies the type of the field.
        Returns:
        the type of the field.
      • getLength

        @Pure
        public int getLength()
        Replies the length of the field.
        Returns:
        the length of the field.
      • getDecimalPointPosition

        @Pure
        public int getDecimalPointPosition()
        Replies the position of the decimal point for this field.
        Returns:
        the position of the decimal point for this field.
      • getAttributeType

        @Pure
        public AttributeType getAttributeType()
        Replies the attribute type corresponding to the field type.
        Returns:
        the attribute type corresponding to the field type.
      • updateSizes

        void updateSizes​(int fieldLength,
                         int decimalPointPosition)
        Update the sizes with the given ones if and only if they are greater than the existing ones. This test is done according to the type of the field.
        Parameters:
        fieldLength - is the size of this field
        decimalPointPosition - is the position of the decimal point.