|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.elca.el4j.tests.remoting.service.impl.CalculatorImpl
public class CalculatorImpl
This class is the implementation of the calculator.
| Constructor Summary | |
|---|---|
CalculatorImpl()
|
|
| Method Summary | |
|---|---|
double |
calculate(double a,
double b,
CalculatorOperation operation)
Executes the given operation with a and b and
returns the result. |
int |
countNumberOfUppercaseLetters(String text)
This method counts all uppercase letters of a text. |
CalculatorValueObject |
echoValueObject(CalculatorValueObject valueObject)
This method does an echo of the given object. |
double |
getArea(double a,
double b)
This method calculates the area of a rectangle. |
void |
throwMeAnException()
This method throws an exception for test reason. |
void |
throwMeASpecialException(String action)
This method throws a special exception for test reason. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CalculatorImpl()
| Method Detail |
|---|
public double getArea(double a,
double b)
getArea in interface Calculatora - Is the first side.b - Is the second side.
public void throwMeAnException()
throws CalculatorException
throwMeAnException in interface CalculatorCalculatorException - will be thrown every time.
public void throwMeASpecialException(String action)
throws SpecialCalculatorException
throwMeASpecialException in interface Calculatoraction - Is the dynamic part of the thrown exception.
SpecialCalculatorException - will be thrown every time.public int countNumberOfUppercaseLetters(String text)
countNumberOfUppercaseLetters in interface Calculatortext - Is the object to analyze.
public CalculatorValueObject echoValueObject(CalculatorValueObject valueObject)
echoValueObject in interface CalculatorvalueObject - Is the object to echo.
public double calculate(double a,
double b,
CalculatorOperation operation)
a and b and
returns the result.
calculate in interface Calculatora - Is the first parameter for the calculation.b - Is the second parameter for the calculation.operation - Is the operation to execute.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||