org.apache.hadoop.examples.pi.math
Class ArithmeticProgression

java.lang.Object
  extended by org.apache.hadoop.examples.pi.math.ArithmeticProgression
All Implemented Interfaces:
Comparable<ArithmeticProgression>

public class ArithmeticProgression
extends Object
implements Comparable<ArithmeticProgression>

An arithmetic progression


Field Summary
 long delta
          Difference between terms
 long limit
          Ending value
 char symbol
          A symbol
 long value
          Starting value
 
Constructor Summary
ArithmeticProgression(char symbol, long value, long delta, long limit)
          Constructor
 
Method Summary
 int compareTo(ArithmeticProgression that)
          
 boolean equals(Object obj)
          
 long getSteps()
          Get the number of steps
 int hashCode()
          Not supported
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

symbol

public final char symbol
A symbol


value

public final long value
Starting value


delta

public final long delta
Difference between terms


limit

public final long limit
Ending value

Constructor Detail

ArithmeticProgression

public ArithmeticProgression(char symbol,
                             long value,
                             long delta,
                             long limit)
Constructor

Method Detail

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

hashCode

public int hashCode()
Not supported

Overrides:
hashCode in class Object

compareTo

public int compareTo(ArithmeticProgression that)

Specified by:
compareTo in interface Comparable<ArithmeticProgression>

getSteps

public long getSteps()
Get the number of steps


toString

public String toString()

Overrides:
toString in class Object


Copyright © 2009 The Apache Software Foundation