Package com.changenode
Class Calculator
java.lang.Object
com.changenode.Calculator
Simple Calculator for demonstration purposes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd
(double value) int
arbitrarilyComplexMethod
(String foo, int bar, Object spam, EventListener eventListener, StringTokenizer stringTokenizer) Method intended to trip the PMD violations error.int
arbitrarilyComplexMethodPart2
(String foo, int bar, Object spam, EventListener eventListener, StringTokenizer stringTokenizer) Method intended to trip the CPM violations errordivide
(double value) multiply
(double value) subtract
(double value) transwarp
(double value) double
value()
-
Constructor Details
-
Calculator
public Calculator()
-
-
Method Details
-
add
- Parameters:
value
- to add to register- Returns:
- the original Calculator object
-
subtract
- Parameters:
value
- to subtract from the register- Returns:
- the original Calculator object
-
multiply
- Parameters:
value
- to multiply the register by- Returns:
- the original Calculator object
-
divide
- Parameters:
value
- to divide the register by- Returns:
- the original Calculator object
-
value
- Returns:
- current value of the register
-
transwarp
- Parameters:
value
- to apply transwarp value- Returns:
- the original Calculator object
-
arbitrarilyComplexMethod
public int arbitrarilyComplexMethod(String foo, int bar, Object spam, EventListener eventListener, StringTokenizer stringTokenizer) Method intended to trip the PMD violations error. Hopefully you find this method as horrifying as I do even without PMD.- Parameters:
foo
- random stringbar
- random stringspam
- untyped Object FTWeventListener
- some kind of events...?stringTokenizer
- because why not?- Returns:
- some number
-
arbitrarilyComplexMethodPart2
public int arbitrarilyComplexMethodPart2(String foo, int bar, Object spam, EventListener eventListener, StringTokenizer stringTokenizer) Method intended to trip the CPM violations error- Parameters:
foo
- random stringbar
- random stringspam
- untyped Object FTWeventListener
- some kind of events...?stringTokenizer
- because why not?- Returns:
- some number
-