use Integer.compare to compare arity
use Double.compare to compare Numerics
javadoc spelling
added more number\1 tests
exception message
javadoc
add(List<Term> list, Term newTerm)

Improved efficiency by using a single loop to determine both if the
specified term is a duplicate and, if not, finding its correct position
in the list (rather than doing in two separate loops).