- java.lang.Object
-
- org.arakhne.afc.io.dbase.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 Summary
Constructors Constructor Description DBaseFileField(String name, DBaseFieldType type)
Constructor.DBaseFileField(String name, DBaseFieldType type, int length, int decimal_pos)
Constructor.DBaseFileField(String name, DBaseFieldType type, int length, int decimal_pos, int columnIndex)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
AttributeType
getAttributeType()
Replies the attribute type corresponding to the field type.int
getColumnIndex()
Replies the index of this column.int
getDecimalPointPosition()
Replies the position of the decimal point for this field.int
getLength()
Replies the length of the field.String
getName()
Replies the name of the field.DBaseFieldType
getType()
Replies the type of the field.int
hashCode()
static boolean
isUnsetValue(String value)
Replies if the given value corresponds to an unset value inside the dBase file.(package private) void
setColumnIndex(int columnIndex)
Set the index of this column.String
toString()
(package private) void
updateSizes(int fieldLength, int decimalPointPosition)
Update the sizes with the given ones if and only if they are greater than the existing ones.
-
-
-
Constructor Detail
-
DBaseFileField
DBaseFileField(String name, DBaseFieldType type)
Constructor.- Parameters:
name
- is the name of the fieldtype
- 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 fieldtype
- is the dBase type of the fieldlength
- is the size of the fielddecimal_pos
- is the position of the decimal point, if anycolumnIndex
- 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 fieldtype
- is the dBase type of the fieldlength
- is the size of the fielddecimal_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"; otherwisefalse
.
-
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.
-
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 fielddecimalPointPosition
- is the position of the decimal point.
-
-