org.xBaseJ.fields
Class FloatField

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

public class FloatField
extends NumField

This class is courtesy of the xBaseJ project: http://xbasej.sourceforge.net/ Copyright 1997-2007 - American Coders, LTD - Raleigh NC USA

 American Coders, Ltd
 P. O. Box 97462
 Raleigh, NC  27615  USA
 1-919-846-2014
 http://www.americancoders.com
 

Author:
Joe McVerry, American Coders Ltd.
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.xBaseJ.fields.Field
buffer, bytebuffer, deleted, myoffset, name, nength, 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, 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,
                  ByteBuffer inBuffer)
           throws xBaseJException
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
Returns:
char field type

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 © 2007-2011. All Rights Reserved.