JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.util.formulae
Class Round

java.lang.Object
  |
  +--com.klg.jclass.util.formulae.Operation
        |
        +--com.klg.jclass.util.formulae.Round
All Implemented Interfaces:
Cloneable, Expression

public class Round
extends Operation

This is a concrete implementation for the round operation. Round is defined as nearest integer, with rounding done to an even number if the operand is exactly between two integers. This is a unary operator, *???but can also work on lists???*.


Field Summary
 
Fields inherited from class com.klg.jclass.util.formulae.Operation
leftOperand, rightOperand
 
Constructor Summary
Round(com.klg.jclass.util.formulae.Expression operand)
          Define a rounding operation on the given Expression
Round(Number operand)
          Define a rounding operation on the given Number
 
Method Summary
 com.klg.jclass.util.formulae.Result evaluate()
          Return the nearest integer to the given value
 
Methods inherited from class com.klg.jclass.util.formulae.Operation
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Round

public Round(com.klg.jclass.util.formulae.Expression operand)
Define a rounding operation on the given Expression


Round

public Round(Number operand)
Define a rounding operation on the given Number

Method Detail

evaluate

public com.klg.jclass.util.formulae.Result evaluate()
Return the nearest integer to the given value

Specified by:
evaluate in interface Expression
Specified by:
evaluate in class Operation
Returns:
The rounded value of the given operand

Copyright © 2004 Quest Software Inc..
All rights reserved.