FileDocCategorySizeDatePackage
QuadraticSequence.javaAPI DocExample563Wed Apr 20 15:11:32 BST 2005None

QuadraticSequence

public class QuadraticSequence extends AbstractList
An immutable List representing the sequence ax^2 + bx + c

Fields Summary
final int
size
final double
a
final double
b
final double
c
Constructors Summary
QuadraticSequence(double a, double b, double c, int size)

        this.a = a; this.b = b; this.c = c; this.size = size;
    
Methods Summary
public java.lang.Doubleget(int index)

        if (index<0 || index>=size) throw new ArrayIndexOutOfBoundsException();
        return a*index*index + b*index + c;
    
public intsize()

 return size;