org.xBaseJ.fields
Class LogicalField

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

public class LogicalField
extends Field

See Also:
Serialized Form

Field Summary
static byte BYTEFALSE
           
static byte BYTETRUE
           
 
Fields inherited from class org.xBaseJ.fields.Field
buffer, bytebuffer, Deleted, Length, myoffset, Name, otherValidCharacters
 
Constructor Summary
LogicalField()
           
LogicalField(String iName)
          public method for creating a LogicalField object.
LogicalField(String iName, java.nio.ByteBuffer inBuffer)
           
 
Method Summary
 Object clone()
           
 boolean getBoolean()
          returns true or false
 char getChar()
          returns T for true and F for false
 char getType()
          return the character 'L' indicating a logical Field
 void put(boolean inValue)
          allows input true or false
 void put(char inValue)
          allows input of Y, y, T, t and 1 for true, N, n, F, f, and 0 for false
 void put(String inValue)
          allows input of Y, y, T, t and 1 for true, N, n, F, f, and 0 for false
 
Methods inherited from class org.xBaseJ.fields.Field
get, getBytes, getDecimalPositionCount, 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
 

Field Detail

BYTETRUE

public static final byte BYTETRUE
See Also:
Constant Field Values

BYTEFALSE

public static final byte BYTEFALSE
See Also:
Constant Field Values
Constructor Detail

LogicalField

public LogicalField()

LogicalField

public LogicalField(String iName,
                    java.nio.ByteBuffer inBuffer)
             throws xBaseJException

LogicalField

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

Parameters:
iName - the name of the field
Throws:
xBaseJException - exception caused in calling methods
IOException - can not occur but defined for calling methods
See Also:
Field
Method Detail

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class Field
Throws:
CloneNotSupportedException

getType

public char getType()
return the character 'L' indicating a logical Field

Overrides:
getType in class Field
Returns:
char field type

put

public void put(String inValue)
         throws xBaseJException
allows input of Y, y, T, t and 1 for true, N, n, F, f, and 0 for false

Overrides:
put in class Field
Parameters:
inValue - value to set
Throws:
xBaseJException - most likely a format exception

put

public void put(char inValue)
         throws xBaseJException
allows input of Y, y, T, t and 1 for true, N, n, F, f, and 0 for false

Throws:
xBaseJException - most likely a format exception

put

public void put(boolean inValue)
allows input true or false


getChar

public char getChar()
returns T for true and F for false


getBoolean

public boolean getBoolean()
returns true or false



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