void test(inputParameter1 [, inputParameter2 ... ], expectedOutput)
This method will simply call the method to test with the input parameter(s), and then check if the returned value is equal to the "expectedOutput" value. If it is not, the method will throw a RuntimeException. Simple and easy to understand and maintain for others, and it doesn't require any special framework knowledge. private boolean groupsContainsANonNumber(String[] groups, boolean emptyStringIsNonNumber) {
for (String group : groups) {
if (group == null) {
continue;
}
if (group.length() == 0) {
if (emptyStringIsNonNumber) {
return true;
}
continue;
}
if (!StringUtil.isStringADouble(group)) {
return true;
}
}
return false;
}
I would NOT code it like this: private boolean groupsContainsANonNumber(String[] groups, boolean emptyStringIsNonNumber) {
for (String group : groups) {
if (group != null && ((group.length() == 0 && emptyStringIsNonNumber) || (group.length() > 0 && !StringUtil.isStringADouble(group)))) {
return true;
}
}
return false;
}
| Version | Build number | Description |
| 1.0.0 | 1 | Initial version, not released, not public |
| 1.0.0.1 | 2 | First build, not released, not public |
| 1.0.0.2 | 3 | Second build, not released, not public |
| 1.0.1 | 4 | First public release |
| 1.0.1.1 | 5 | First build after first public release, not released, not public |
| 1.0.1.2 | 6 | Second build after first public release, not released, not public |
| 1.0.2 | 7 | Second public release |
| Technology | Used in project |
| Java Generics | Almost all the projects on the List of projects page. |
| Java serialization | For a API wrapper of Java serialization see the arcommon.persistens.SerializableUtil class in the AR Common project. For a XML serialization implementation see the XmlSerializer and XmlDeserializer classes in the arcommon.xml package in the AR Common project. This XML serialization is used in all the projects on the List of projects page that have settings (See the arcommon.persistens.SettingsUtil class in the AR Common project for details). |
| Java bytecode injection | See the GUI Finder project for use. The actual bytecode injection is done by the Javassist-3.21.0-GA-(Modified) project (Not created by me). |
| Java agent | See the GUI Finder project. |
| Java Reflection | See the arcommon.ReflectionUtil class in the AR Common project. See the SWS and the EJB-container-simulator (Not public) project on the Other projects page. |
| Java Annotations | See the SWS and the EJB-container-simulator (Not public) project on the Other projects page. |
| Java Dynamic Proxy Classes | See the SWS and the EJB-container-simulator (Not public) project on the Other projects page. |
| Java Dynamic Class Loading | Used for plug-in loading in the File Tool and Sim Plan Client projects. |
| Java Native Interface (JNI) | See the Arduino Emulator project for use. |
| Observer pattern | See the File Tool project. |
| Command pattern | See the GUIOpdateringsJDialog class and all the subclasses of the AbstractOpdaterOperation class in the File Tool project. |
| Model–view–controller (MVC) pattern | See the File Tool and Family Tree projects. |
| Complicated math / algorithm | See the familytree.layout.FamilyTreeLayoutManager class in the Family Tree project. See the udregn_string function (and the helper functions udregn_del_string and udregn_signed_long_omstter_string) in the M_UDRE_V.C source file in the TC Edit (Not public) project on the Other projects page. See especially the combinator.parser.ExpressionParser class in the Combinator project and that project in general. |
| Animation / graphical rendering | See the familytree.gui.FamilyTreeJComponent class in the Family Tree project for a paintComponent() override. See the simplan.client.gui.SimPlanMapJComponent class in the Sim Plan project for a paintComponent() override. See the diskusageviewer.RadarGraph class in the Disk Usage Viewer project for a paintComponent() override. See the guifinder.GUIFinderGlassPane class in the GUI Finder project for a JRootPane.setGlassPane(). See the regularexpressiondebugger.RegularExpressionDebuggerGlassPane class in the Regular Expression Debugger project for a JRootPane.setGlassPane(). See the arduinoemulator.runner.gui.ArduinoEmulatorRunnerGlassPane class in the Arduino Emulator project for a JRootPane.setGlassPane(). See the zoomtool.ZoomToolGlassPane class in the Zoom Tool project for a JRootPane.setGlassPane(). See the Animator (Not public) project (and its predecessors D3, V3D and 3D) on the Other projects page. |