net.sf.cb2java.copybook
Class Floating

java.lang.Object
  extended bynet.sf.cb2java.copybook.Element
      extended bynet.sf.cb2java.copybook.Leaf
          extended bynet.sf.cb2java.copybook.Floating

public class Floating
extends net.sf.cb2java.copybook.Leaf


Constructor Summary
protected Floating(java.lang.String name, int level, int occurs, Conversion.Precision precision)
           
 
Method Summary
 java.util.List getChildren()
          gets the children of this element or null if there are none
protected  int getLength()
          returns the length of one instance of this element
protected  Value getValue()
          the value for this element
 byte[] toBytes(java.lang.Object data)
          converts the supplied data to bytes
 void validate(java.lang.Object data)
          validates the data based on this element definition
 
Methods inherited from class net.sf.cb2java.copybook.Element
getBytes, getLevel, getName, getOccurs, getPosition, getString, toString, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Floating

protected Floating(java.lang.String name,
                   int level,
                   int occurs,
                   Conversion.Precision precision)
Method Detail

getValue

protected Value getValue()
Description copied from class: Element
the value for this element

Specified by:
getValue in class Element
Returns:
the value set for this element or the default

getLength

protected int getLength()
Description copied from class: Element
returns the length of one instance of this element

Specified by:
getLength in class Element
Returns:
the length of one instance of this element

validate

public void validate(java.lang.Object data)
              throws java.lang.IllegalArgumentException
Description copied from class: Element
validates the data based on this element definition

Specified by:
validate in class Element
Parameters:
data - the data to validate
Throws:
java.lang.IllegalArgumentException - if the data is invalid

toBytes

public byte[] toBytes(java.lang.Object data)
Description copied from class: Element
converts the supplied data to bytes

Specified by:
toBytes in class Element
Parameters:
data - the data to convert to bytes
Returns:
the bytes for the data

getChildren

public java.util.List getChildren()
Description copied from class: Element
gets the children of this element or null if there are none

Specified by:
getChildren in class Element
Returns:
the children of this element or null if there are none