Menu

Use the Javadoc!

JamesCox

The javadoc included with MathTools is the ultimate reference and explanation of how to use the tools. (This is why it should not be deleted!) This page was written to explain some of the issues and concerns that may occur when browsing the javadoc.

What's in a Namespace?

The namespace used for MathTools is cox.jmatt.java.MathTools. It was chosen to avoid collision with any existing Java packages and, to the extend of my research, there are no collisions. This is not tied to any particular domain or internet URL, it is simply the prefix and path chosen.

Static and Instance Methods

Static methods are Java methods attached to a class rather than an object (instance). This is important because some scripting languages or implementations do not expose static methods to scripts. MathTools overcomes this two ways: shadowing methods and SCROBs.

Shadow methods are instance methods that refer directly to a static method. The name is altered slightly and the descriptions of the static and shadowing methods appear next to each other in the javadoc detail section.

SCROBs, or SCRipting OBjects are classes whose instance methods exactly mirror those of a static class. For instance the Arithmetic class consists entirely of static methods. The Arithmetic_SCROB class duplicates those methods exactly as instance methods.

When scripting, if your implementation begins complaining about not finding static methods, use the shadowing methods in their place. If the class is completely static (like Arithmetic) then it will have one instance method: getSCROB(). Call this method to obtain a SCROB instance and use the SCROB in place of the tool itself.

File Dialogs and Frames

Some of the tool or demo classes imply that they might not be created around a Dialog or Frame. This is only true if the MathTools classes are embedded in a custom Java application!

Any time MathTools is run from the JAR all FileDialogs will be available!

So don't panic when you see the words '... may not always be available.' If you're running from the JAR all file dialogs and other frame- or dialog-related features are fully available.


Related

Wiki: Scripting MathTools

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.