org.apache.cocoon.components.elementprocessor.types
Class NumericResult

java.lang.Object
  extended by org.apache.cocoon.components.elementprocessor.types.NumericResult

public class NumericResult
extends Object

This class holds the result of a numeric conversion. The result is either a valid value, or an IOException that was created by the numeric converter

Version:
CVS $Id: NumericResult.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Marc Johnson (marc_johnson27591@hotmail.com)

Constructor Summary
NumericResult(IOException exception)
          Constructor
NumericResult(Number value)
          Constructor
 
Method Summary
 double doubleValue()
          Get the value, if possible, as a double
 int intValue()
          Get the value, if possible, as an int
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumericResult

public NumericResult(Number value)
Constructor

Parameters:
value - the numeric value

NumericResult

public NumericResult(IOException exception)
Constructor

Parameters:
exception - the exception to be thrown
Method Detail

intValue

public int intValue()
             throws IOException
Get the value, if possible, as an int

Returns:
the value, as an int
Throws:
IOException - if there was a problem converting the number

doubleValue

public double doubleValue()
                   throws IOException
Get the value, if possible, as a double

Returns:
the value, as a double
Throws:
IOException - if there was a problem converting the number


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.