org.xBaseJ.fields
Class FloatField

java.lang.Object
  extended byorg.xBaseJ.fields.Field
      extended byorg.xBaseJ.fields.NumField
          extended byorg.xBaseJ.fields.FloatField
All Implemented Interfaces:
Cloneable, Externalizable, Serializable

public class FloatField
extends NumField

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.xBaseJ.fields.Field
buffer, bytebuffer, Deleted, Length, myoffset, Name, otherValidCharacters
 
Constructor Summary
FloatField()
           
FloatField(String iName, int iLength, int DecPoint)
          public method for creating a numeric field object.
FloatField(String iName, int iLength, int DecPoint, java.nio.ByteBuffer inBuffer)
           
 
Method Summary
 char getType()
          return the character 'F' indicating a float field
 void put(double inValue)
          sets the field contents.
 void put(float inValue)
          sets the field contents.
 void put(int inValue)
          sets the field contents.
 void put(long inValue)
          sets the field contents.
 void put(String inValue)
          sets the field contents.
 
Methods inherited from class org.xBaseJ.fields.NumField
clone, get, getDecimalPositionCount
 
Methods inherited from class org.xBaseJ.fields.Field
getBytes, getLength, getName, put, read, readExternal, setBuffer, setBufferSpace, setField, update, write, writeExternal
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FloatField

public FloatField()

FloatField

public FloatField(String iName,
                  int iLength,
                  int DecPoint,
                  java.nio.ByteBuffer inBuffer)
           throws xBaseJException

FloatField

public FloatField(String iName,
                  int iLength,
                  int DecPoint)
           throws xBaseJException,
                  IOException
public method for creating a numeric field object. It is not associated with a database but can be when used with some DBF methods.

Parameters:
iName - the name of the field
iLength - the length of Field. range is 1 to 19 bytes
DecPoint - the number of decimal positions range from 2 to 17 bytes. Relative to Length.
Throws:
xBaseJException - bad name, length or decimal positions specified
IOException - can not occur but defined for calling methods
See Also:
Field
Method Detail

getType

public char getType()
return the character 'F' indicating a float field

Overrides:
getType in class NumField

put

public void put(String inValue)
         throws xBaseJException
sets the field contents.

Overrides:
put in class NumField
Parameters:
inValue - String
Throws:
xBaseJException - most likely a format exception

put

public void put(long inValue)
         throws xBaseJException
sets the field contents.

Overrides:
put in class NumField
Parameters:
inValue - long
Throws:
xBaseJException - most likely a format exception

put

public void put(int inValue)
         throws xBaseJException
sets the field contents.

Overrides:
put in class NumField
Parameters:
inValue - int
Throws:
xBaseJException - most likely a format exception

put

public void put(float inValue)
         throws xBaseJException
sets the field contents.

Overrides:
put in class NumField
Parameters:
inValue - float
Throws:
xBaseJException - most likely a format exception

put

public void put(double inValue)
         throws xBaseJException
sets the field contents.

Overrides:
put in class NumField
Parameters:
inValue - double
Throws:
xBaseJException - most likely a format exception


Copyright © 1997-2007 American Coders Ltd. All Rights Reserved.