Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

Scaler Class Reference

Inheritance diagram for Scaler::

Function1 List of all members.

Public Methods

Object apply (Object x)

Detailed Description

A Scaler is a Function1 object that can be used to scale a list of Numbers by a scale factor. If both the scale factor and the function argument are Integer or Long, a Long will be returned. Otherwise a Double will be returned.

Definition at line 12 of file Scaler.java.


Member Function Documentation

Object Scaler::apply ( Object x ) [inline]
 

Apply this Scaler object to an Object x, which should be a Number. If x is not a number, a ClassCastException will be thrown.

Parameters:
x   the Object to which this function is applied
Returns:
a Double containing this Scaler's factor times the argument's value

Reimplemented from Function1.

Definition at line 35 of file Scaler.java.


The documentation for this class was generated from the following file:
Generated at Wed Feb 19 23:28:38 2003 for OpenList by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001