Calculator resource exposed at '/calculator' path
◆ calculate()
String resources.CalculatorResource.calculate |
( |
String |
expression | ) |
|
|
inline |
Method handling HTTP POST requests. The calculated answer to the expression will be sent to the client as plain/text.
- Parameters
-
expression | the expression to be solved as plain/text. |
- Returns
- solution to the expression as plain/text or -1 on error
◆ subtraction()
int resources.CalculatorResource.subtraction |
( |
String |
expression | ) |
|
|
inline |
Method used to calculate a subtraction expression.
- Parameters
-
expression | the expression to be calculated as a String |
- Returns
- the answer as an int
◆ sum()
int resources.CalculatorResource.sum |
( |
String |
expression | ) |
|
|
inline |
Method used to calculate a sum expression.
- Parameters
-
expression | the equation to be calculated as a String |
- Returns
- the answer as an int
The documentation for this class was generated from the following file:
- src/main/java/resources/CalculatorResource.java