Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

It is very confusing to have members like add(Object o1, Object o2) as members of the classes. This is counter-intuitive. Either there ought to be a supporter class with static members only, or the member of the type class expects only one argument.
So:
vec1.add(vec1, vec2) #BAD
vec1.add(vec2) #GOOD
import static x.y.add; add(vec1, vec2); #GOOD

Extending classes

Example of how not to do it:
public class RadLengths extends Hashtable #BAD !!!
The radiation lengths are not a new kind of HashTable. They should be implemented USING a HashTable !
The problem here is that nothing prevents the user from subclassing the RadLengths class, pulling in all that extra garbage.
Extending a class means that the new class is a more specialized version of the parent class. This is clearly not the case here and there are not benefits of implementing the RadLength class like this.

Using strings to access parameters

...