JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.util.formulae
Class Trunc

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

public class Trunc
extends Operation

This is a concrete implementation for the trunc (truncation) operation. Trunc is also known as "integer part," the result is equivalent to "round to zero," since it rounds to the nearest integer closer to zero. 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
Trunc(com.klg.jclass.util.formulae.Expression operand)
          Define a truncation operation on the given Expression
Trunc(Number operand)
          Define a truncation operation on the given Number
 
Method Summary
 com.klg.jclass.util.formulae.Result evaluate()
          Return the integer part of a given number (round to zero)
 
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

Trunc

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


Trunc

public Trunc(Number operand)
Define a truncation operation on the given Number

Method Detail

evaluate

public com.klg.jclass.util.formulae.Result evaluate()
Return the integer part of a given number (round to zero)

Specified by:
evaluate in interface Expression
Specified by:
evaluate in class Operation
Returns:
The integer part of the given operand

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