org.apache.examples.impl
Class CalculatorImpl

java.lang.Object
  extended by org.apache.examples.impl.CalculatorImpl
All Implemented Interfaces:
Adder, Calculator, Divider, Multiplier, Subtracter

public class CalculatorImpl
extends java.lang.Object
implements Calculator

Implementation of the Calculator service interface. Acts as a facade, delegating each operation to other services. The hivemind.BuilderFactory

Author:
Howard Lewis Ship

Constructor Summary
CalculatorImpl()
           
 
Method Summary
 double add(double arg0, double arg1)
           
 double divide(double arg0, double arg1)
           
 double multiply(double arg0, double arg1)
           
 void setAdder(Adder adder)
           
 void setDivider(Divider divider)
           
 void setMultiplier(Multiplier multiplier)
           
 void setSubtracter(Subtracter subtracter)
           
 double subtract(double arg0, double arg1)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalculatorImpl

public CalculatorImpl()
Method Detail

add

public double add(double arg0,
                  double arg1)
Specified by:
add in interface Adder

subtract

public double subtract(double arg0,
                       double arg1)
Specified by:
subtract in interface Subtracter

multiply

public double multiply(double arg0,
                       double arg1)
Specified by:
multiply in interface Multiplier

divide

public double divide(double arg0,
                     double arg1)
Specified by:
divide in interface Divider

setAdder

public void setAdder(Adder adder)

setDivider

public void setDivider(Divider divider)

setMultiplier

public void setMultiplier(Multiplier multiplier)

setSubtracter

public void setSubtracter(Subtracter subtracter)


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.