stepthom/math-fun — pull request #67 by johns1342 (2013-12-17 22:11:32+00:00)
Title: Issue #58 MathFunction:equals(), hashCode(), and unit test for equals

Take 2 of the PR and implementation of equals and hashCode functions with prior comments incorporated.
MathFunction.java
- Added equals() which relies on termsByExponent's underyling Set::equals(), which compares all keys and values (and same for hashCode).
- Cleaned up first attempt as per comments so it reads a little cleaner/easier now.
MathFunctionTest.java
- Added equalsTests() which attempts to break equals() based on order terms are added, dead terms (0 coefficients), fractional versus integer terms, summation of terms (e.g. 2x + 2x vs 4x), and integral and derivative equality.
* This my first JUnit test function ever, so any advice on how to improve it or make it more idiomatic is welcome!