Function.java


Below is the syntax highlighted version of Function.java from §3.3 Designing Data Types.


/******************************************************************************
 *  Compilation:  javac Function.java
 *  Execution:    none
 *
 *  An interface for real-valued functions of one variable.
 *
 ******************************************************************************/

public interface Function {
    public abstract double evaluate(double x);
}


Copyright © 2000–2017, Robert Sedgewick and Kevin Wayne.
Last updated: Fri Oct 20 14:12:12 EDT 2017.