Package ucar.nc2.ui.gis.shapefile
Class DbaseData
- java.lang.Object
-
- ucar.nc2.ui.gis.shapefile.DbaseData
-
public class DbaseData extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
TYPE_BOOLEAN
Data is an array of booleans (boolean[]).static int
TYPE_CHAR
Character type data (String[]).static int
TYPE_NUMERIC
Data is an array of doubles (double[]).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getBoolean(int i)
Method to retrieve a boolean for this fieldboolean[]
getBooleans()
Method to retrieve a booleans array for this fieldObject
getData(int i)
Method to retrieve data for this fielddouble
getDouble(int i)
Method to retrieve a double for this fielddouble[]
getDoubles()
Method to retrieve the double array for this fieldint
getNumRec()
String
getString(int i)
Method to retrieve a String for this fieldString[]
getStrings()
Method to retrieve an array of Strings for this fieldint
getType()
Method to return the type of data for the field
-
-
-
Field Detail
-
TYPE_CHAR
public static final int TYPE_CHAR
Character type data (String[]).- See Also:
- Constant Field Values
-
TYPE_NUMERIC
public static final int TYPE_NUMERIC
Data is an array of doubles (double[]).- See Also:
- Constant Field Values
-
TYPE_BOOLEAN
public static final int TYPE_BOOLEAN
Data is an array of booleans (boolean[]).- See Also:
- Constant Field Values
-
-
Method Detail
-
getType
public int getType()
Method to return the type of data for the field- Returns:
- One of TYPE_CHAR, TYPE_BOOLEAN, or TYPE_NUMERIC
-
getDoubles
public double[] getDoubles()
Method to retrieve the double array for this field- Returns:
- An array of doubles with the data
-
getDouble
public double getDouble(int i)
Method to retrieve a double for this field- Parameters:
i
- index of desired double, assumes 0 < i < getNumRec()- Returns:
- A double with the data
-
getBooleans
public boolean[] getBooleans()
Method to retrieve a booleans array for this field- Returns:
- An array of boolean values
-
getBoolean
public boolean getBoolean(int i)
Method to retrieve a boolean for this field- Parameters:
i
- index of desired boolean, assumes 0 < i < getNumRec()- Returns:
- A boolean with the data
-
getStrings
public String[] getStrings()
Method to retrieve an array of Strings for this field- Returns:
- An array of Strings
-
getString
public String getString(int i)
Method to retrieve a String for this field- Parameters:
i
- index of desired String, assumes 0 < i < getNumRec()- Returns:
- A String with the data
-
getData
public Object getData(int i)
Method to retrieve data for this field- Parameters:
i
- index of desired String, assumes 0 < i < getNumRec()- Returns:
- either a Double, Boolean, or String with the data
-
getNumRec
public int getNumRec()
- Returns:
- The number of records in the field.
-
-