Class Calculator

java.lang.Object
com.changenode.Calculator

public class Calculator extends Object
Simple Calculator for demonstration purposes.
  • Constructor Details

  • Method Details

    • add

      public Calculator add(double value)
      Parameters:
      value - to add to register
      Returns:
      the original Calculator object
    • subtract

      public Calculator subtract(double value)
      Parameters:
      value - to subtract from the register
      Returns:
      the original Calculator object
    • multiply

      public Calculator multiply(double value)
      Parameters:
      value - to multiply the register by
      Returns:
      the original Calculator object
    • divide

      public Calculator divide(double value)
      Parameters:
      value - to divide the register by
      Returns:
      the original Calculator object
    • value

      public double value()
      Returns:
      current value of the register
    • transwarp

      public Calculator transwarp(double value)
      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 string
      bar - random string
      spam - untyped Object FTW
      eventListener - 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 string
      bar - random string
      spam - untyped Object FTW
      eventListener - some kind of events...?
      stringTokenizer - because why not?
      Returns:
      some number