ucar.unidata.gis.shapefile
Class DbaseData

java.lang.Object
  extended by ucar.unidata.gis.shapefile.DbaseData

public class DbaseData
extends Object

Class DbaseData

Author:
Russ Rew

Field Summary
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
 List asList()
          _more_
 boolean getBoolean(int i)
          Method to retrieve a boolean for this field
 boolean[] getBooleans()
          Method to retrieve a booleans array for this field
 Object getData(int i)
          Method to retrieve data for this field
 double getDouble(int i)
          Method to retrieve a double for this field
 double[] getDoubles()
          Method to retrieve the double array for this field
 int getNumRec()
           
 String getString(int i)
          Method to retrieve a String for this field
 String[] getStrings()
          Method to retrieve an array of Strings for this field
 int getType()
          Method to return the type of data for the field
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

asList

public List asList()
_more_

Returns:
_more_

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.