From 918ba05b00427b7a782f9399e6d0296fe4f67d3c Mon Sep 17 00:00:00 2001 From: helllth Date: Wed, 12 Dec 2012 11:25:28 +0100 Subject: [PATCH 01/34] fixed #8 BrowserLauncher uses now java.awt.Desktop an dreports problems when an exception in the static block occurs --- .../java/de/cismet/tools/BrowserLauncher.java | 124 +++++++----------- 1 file changed, 48 insertions(+), 76 deletions(-) diff --git a/src/main/java/de/cismet/tools/BrowserLauncher.java b/src/main/java/de/cismet/tools/BrowserLauncher.java index 3c41cc6..6c28b71 100644 --- a/src/main/java/de/cismet/tools/BrowserLauncher.java +++ b/src/main/java/de/cismet/tools/BrowserLauncher.java @@ -69,10 +69,8 @@ public class BrowserLauncher { * but some operating systems require us to switch on the VM. */ private static int jvm; - /** The browser for the system. */ private static Object browser; - /** * Caches whether any classes, methods, and fields that are not part of the JDK and need to be dynamically loaded at * runtime loaded successfully. @@ -80,110 +78,77 @@ public class BrowserLauncher { *

Note that if this is false, openURL() will always return an IOException.

*/ private static boolean loadedWithoutErrors; - /** The com.apple.mrj.MRJFileUtils class. */ private static Class mrjFileUtilsClass; - /** The com.apple.mrj.MRJOSType class. */ private static Class mrjOSTypeClass; - /** The com.apple.MacOS.AEDesc class. */ private static Class aeDescClass; - /** The (int) method of com.apple.MacOS.AETarget. */ private static Constructor aeTargetConstructor; - /** The (int, int, int) method of com.apple.MacOS.AppleEvent. */ private static Constructor appleEventConstructor; - /** The (String) method of com.apple.MacOS.AEDesc. */ private static Constructor aeDescConstructor; - /** The findFolder method of com.apple.mrj.MRJFileUtils. */ private static Method findFolder; - /** The getFileCreator method of com.apple.mrj.MRJFileUtils. */ private static Method getFileCreator; - /** The getFileType method of com.apple.mrj.MRJFileUtils. */ private static Method getFileType; - /** The openURL method of com.apple.mrj.MRJFileUtils. */ private static Method openURL; - /** The makeOSType method of com.apple.MacOS.OSUtils. */ private static Method makeOSType; - /** The putParameter method of com.apple.MacOS.AppleEvent. */ private static Method putParameter; - /** The sendNoReply method of com.apple.MacOS.AppleEvent. */ private static Method sendNoReply; - /** Actually an MRJOSType pointing to the System Folder on a Macintosh. */ private static Object kSystemFolderType; - /** The keyDirectObject AppleEvent parameter type. */ private static Integer keyDirectObject; - /** The kAutoGenerateReturnID AppleEvent code. */ private static Integer kAutoGenerateReturnID; - /** The kAnyTransactionID AppleEvent code. */ private static Integer kAnyTransactionID; - /** The linkage object required for JDirect 3 on Mac OS X. */ private static Object linkage; - /** The framework to reference on Mac OS X. */ private static final String JDirect_MacOSX = "/System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/HIToolbox"; // NOI18N - /** JVM constant for MRJ 2.0. */ private static final int MRJ_2_0 = 0; - /** JVM constant for MRJ 2.1 or later. */ private static final int MRJ_2_1 = 1; - /** JVM constant for Java on Mac OS X 10.0 (MRJ 3.0). */ private static final int MRJ_3_0 = 3; - /** JVM constant for MRJ 3.1. */ private static final int MRJ_3_1 = 4; - /** JVM constant for any Windows NT JVM. */ private static final int WINDOWS_NT = 5; - /** JVM constant for any Windows 9x JVM. */ private static final int WINDOWS_9x = 6; - /** JVM constant for any other platform. */ private static final int OTHER = -1; - /** * The file type of the Finder on a Macintosh. Hardcoding "Finder" would keep non-U.S. English systems from working * properly. */ private static final String FINDER_TYPE = "FNDR"; // NOI18N - /** The creator code of the Finder on a Macintosh, which is needed to send AppleEvents to the application. */ private static final String FINDER_CREATOR = "MACS"; // NOI18N - /** The name for the AppleEvent type corresponding to a GetURL event. */ private static final String GURL_EVENT = "GURL"; // NOI18N - /** The first parameter that needs to be passed into Runtime.exec() to open the default web browser on Windows. */ private static final String FIRST_WINDOWS_PARAMETER = "/c"; // NOI18N - /** The second parameter for Runtime.exec() on Windows. */ private static final String SECOND_WINDOWS_PARAMETER = "start"; // NOI18N - /** * The third parameter for Runtime.exec() on Windows. This is a "title" parameter that the command line expects. * Setting this parameter allows URLs containing spaces to work. */ private static final String THIRD_WINDOWS_PARAMETER = "\"\""; // NOI18N - /** * The shell parameters for Netscape that opens a given URL in an already-open copy of Netscape on many command-line * systems. @@ -191,7 +156,6 @@ public class BrowserLauncher { private static final String NETSCAPE_REMOTE_PARAMETER = "-remote"; // NOI18N private static final String NETSCAPE_OPEN_PARAMETER_START = "'openURL("; // NOI18N private static final String NETSCAPE_OPEN_PARAMETER_END = ")'"; // NOI18N - /** The message from any exception thrown throughout the initialization process. */ private static String errorMessage; @@ -199,45 +163,52 @@ public class BrowserLauncher { * An initialization block that determines the operating system and loads the necessary runtime data. */ static { - loadedWithoutErrors = true; - final String osName = System.getProperty("os.name"); // NOI18N - if (osName.startsWith("Mac OS")) { // NOI18N - final String mrjVersion = System.getProperty("mrj.version"); // NOI18N - final String majorMRJVersion = mrjVersion.substring(0, 3); + if (!Desktop.isDesktopSupported()) { try { - final double version = Double.valueOf(majorMRJVersion).doubleValue(); - if (version == 2) { - jvm = MRJ_2_0; - } else if ((version >= 2.1) && (version < 3)) { - // Assume that all 2.x versions of MRJ work the same. MRJ 2.1 actually - // works via Runtime.exec() and 2.2 supports that but has an openURL() method - // as well that we currently ignore. - jvm = MRJ_2_1; - } else if (version == 3.0) { - jvm = MRJ_3_0; - } else if (version >= 3.1) { - // Assume that all 3.1 and later versions of MRJ work the same. - jvm = MRJ_3_1; + loadedWithoutErrors = true; + final String osName = System.getProperty("os.name"); // NOI18N + if (osName.startsWith("Mac OS")) { // NOI18N + final String mrjVersion = System.getProperty("mrj.version"); // NOI18N + final String majorMRJVersion = mrjVersion.substring(0, 3); + try { + final double version = Double.valueOf(majorMRJVersion).doubleValue(); + if (version == 2) { + jvm = MRJ_2_0; + } else if ((version >= 2.1) && (version < 3)) { + // Assume that all 2.x versions of MRJ work the same. MRJ 2.1 actually + // works via Runtime.exec() and 2.2 supports that but has an openURL() method + // as well that we currently ignore. + jvm = MRJ_2_1; + } else if (version == 3.0) { + jvm = MRJ_3_0; + } else if (version >= 3.1) { + // Assume that all 3.1 and later versions of MRJ work the same. + jvm = MRJ_3_1; + } else { + loadedWithoutErrors = false; + errorMessage = "Unsupported MRJ version: " + version; // NOI18N + } + } catch (NumberFormatException nfe) { + loadedWithoutErrors = false; + errorMessage = "Invalid MRJ version: " + mrjVersion; // NOI18N + } + } else if (osName.startsWith("Windows")) { // NOI18N + if (osName.indexOf("9") != -1) { // NOI18N + jvm = WINDOWS_9x; + } else { + jvm = WINDOWS_NT; + } } else { - loadedWithoutErrors = false; - errorMessage = "Unsupported MRJ version: " + version; // NOI18N + jvm = OTHER; } - } catch (NumberFormatException nfe) { - loadedWithoutErrors = false; - errorMessage = "Invalid MRJ version: " + mrjVersion; // NOI18N - } - } else if (osName.startsWith("Windows")) { // NOI18N - if (osName.indexOf("9") != -1) { // NOI18N - jvm = WINDOWS_9x; - } else { - jvm = WINDOWS_NT; - } - } else { - jvm = OTHER; - } - if (loadedWithoutErrors) { // if we haven't hit any errors yet - loadedWithoutErrors = loadClasses(); + if (loadedWithoutErrors) { // if we haven't hit any errors yet + loadedWithoutErrors = loadClasses(); + } + } catch (Throwable t) { + log.warn("Problem with BrowserLauncher", t); + throw new RuntimeException(t); + } } } @@ -520,21 +491,20 @@ public static void openURLorFile(final String url) { * @throws Exception DOCUMENT ME! * @throws IOException If the web browser could not be located or does not run */ - public static void openURL(final String url) throws Exception { if (log.isDebugEnabled()) { - log.debug("BrowserLauncher.openUrl:" + url); // NOI18N + log.debug("BrowserLauncher.openUrl:" + url); // NOI18N } - if (StaticDebuggingTools.checkHomeForFile("cismetUseDesktopFeatureFromJDK6") && Desktop.isDesktopSupported()) { // NOI18N + if (Desktop.isDesktopSupported()) { // NOI18N final Desktop desktop = Desktop.getDesktop(); desktop.browse(new URI(url)); } else { if (!loadedWithoutErrors) { - throw new IOException("Exception in finding browser: " + errorMessage); // NOI18N + throw new IOException("Exception in finding browser: " + errorMessage); // NOI18N } Object browser = locateBrowser(); if (browser == null) { - throw new IOException("Unable to locate browser: " + errorMessage); // NOI18N + throw new IOException("Unable to locate browser: " + errorMessage); // NOI18N } switch (jvm) { @@ -661,6 +631,7 @@ public static void openURL(final String url) throws Exception { * @return DOCUMENT ME! */ private static native int ICStart(int[] instance, int signature); + /** * DOCUMENT ME! * @@ -669,6 +640,7 @@ public static void openURL(final String url) throws Exception { * @return DOCUMENT ME! */ private static native int ICStop(int[] instance); + /** * DOCUMENT ME! * From 5cb23f7b13064ec7f1a83bca384de88d3726ee80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCsel?= Date: Wed, 2 Jan 2013 17:12:58 +0100 Subject: [PATCH 02/34] [issue #9] downgraded surefire plugin version to 2.9 to fix test debug issue on win platform --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index be3a66c..b48b8bc 100644 --- a/pom.xml +++ b/pom.xml @@ -152,7 +152,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.12 + 2.9 cismetCommons From 47279de688e4495fac5dd3a4e9715927be0ec755 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCsel?= Date: Fri, 4 Jan 2013 16:49:26 +0100 Subject: [PATCH 03/34] #9 Improved Java Doc of package Sirius.util.collections --- .../util/collections/IntMapsString.java | 31 +++++++++------- .../Sirius/util/collections/MultiMap.java | 34 +++++++++++++----- .../util/collections/StringMapsInt.java | 28 ++++++++------- .../util/collections/StringMapsString.java | 36 ++++++++++--------- 4 files changed, 79 insertions(+), 50 deletions(-) diff --git a/src/main/java/Sirius/util/collections/IntMapsString.java b/src/main/java/Sirius/util/collections/IntMapsString.java index c3e3904..d8aee54 100644 --- a/src/main/java/Sirius/util/collections/IntMapsString.java +++ b/src/main/java/Sirius/util/collections/IntMapsString.java @@ -26,8 +26,8 @@ public class IntMapsString extends java.util.Hashtable { /** * Creates a new IntMapsString object. * - * @param initialCapacity DOCUMENT ME! - * @param loadFactor DOCUMENT ME! + * @param initialCapacity Capacity when Object is created + * @param loadFactor buffer for capacity increase */ IntMapsString(final int initialCapacity, final float loadFactor) { super(initialCapacity, loadFactor); @@ -36,24 +36,27 @@ public class IntMapsString extends java.util.Hashtable { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Associates a String astring(value) to a Integery id(key). * - * @param id DOCUMENT ME! - * @param aString DOCUMENT ME! + * @param id key + * @param aString value + * + * @see #put(java.lang.Object, java.lang.Object) */ public void add(final int id, final String aString) { super.put(new Integer(id), aString); } // end add /** - * DOCUMENT ME! + * Getter for the Value as a String * - * @param id DOCUMENT ME! + * @param id key * - * @return DOCUMENT ME! + * @return Stringvalue * - * @throws Exception DOCUMENT ME! - * @throws java.lang.NullPointerException DOCUMENT ME! + * @throws Exception throws Exeption if anything went wrong + * @throws java.lang.NullPointerException "Entry is not a String" if key not a String or "No entry" if + * id<\code> has no entry */ public String getStringValue(final int id) throws Exception { final Integer key = new Integer(id); @@ -72,11 +75,13 @@ public String getStringValue(final int id) throws Exception { // when exception concept is accomplished } /** - * ///// containsIntKey///////////////////////////////// + * Tests if the specified object is a key in IntMapsString * - * @param key DOCUMENT ME! + * @param key possible key * - * @return DOCUMENT ME! + * @return true, if the object is a key in IntMapsString + * + * @see #containsKey(java.lang.Object) */ public boolean containsIntKey(final int key) { return super.containsKey(new Integer(key)); diff --git a/src/main/java/Sirius/util/collections/MultiMap.java b/src/main/java/Sirius/util/collections/MultiMap.java index 93f69cb..98367dc 100644 --- a/src/main/java/Sirius/util/collections/MultiMap.java +++ b/src/main/java/Sirius/util/collections/MultiMap.java @@ -18,15 +18,15 @@ public class MultiMap extends HashMap { //~ Constructors ----------------------------------------------------------- /** - * ////////////////////////////////////////////// + * Creates new Multimap Object with size 10. */ public MultiMap() { this(10); } /** - * ////////////////////////////////////////////// + * Creates new Multimap Object with chosen size. * - * @param size DOCUMENT ME! + * @param size size */ public MultiMap(final int size) { super(size); @@ -35,7 +35,17 @@ public MultiMap(final int size) { //~ Methods ---------------------------------------------------------------- ///////////////////////////////////////////////// - + + /** + * Assosiates value with key in this map. + * Instead of replace the values for a key, are multiple values for one key possible. + * + * @param key key + * @param value value + * + * @return Null + */ + @Override public Object put(final Object key, final Object value) { SyncLinkedList list = null; @@ -59,6 +69,14 @@ public Object put(final Object key, final Object value) { } // end add ////////////////////////////////////////////////////////////// + /** + * Appends the values of the specified map to this map. + * Instead of replace the values for a key, are multiple values for one key possible. + * + * + * + * @param t map + */ @Override public void putAll(final Map t) { @@ -84,12 +102,12 @@ public void putAll(final Map t) { } /** - * ////////////////////////////////////////////////////// + * removes specied value associeated with specified key * - * @param key DOCUMENT ME! - * @param value DOCUMENT ME! + * @param key key whose mapping is to be removed + * @param value mapping to be removed * - * @return DOCUMENT ME! + * @return true, if remove suceeded */ public boolean remove(final Object key, final Object value) { SyncLinkedList list = null; diff --git a/src/main/java/Sirius/util/collections/StringMapsInt.java b/src/main/java/Sirius/util/collections/StringMapsInt.java index f47c7f6..4f60b9e 100644 --- a/src/main/java/Sirius/util/collections/StringMapsInt.java +++ b/src/main/java/Sirius/util/collections/StringMapsInt.java @@ -26,8 +26,8 @@ public StringMapsInt() { /** * Creates a new StringMapsInt object. * - * @param initialCapacity DOCUMENT ME! - * @param loadFactor DOCUMENT ME! + * @param initialCapacity Capacity when Object is created + * @param loadFactor buffer for capacity increase */ public StringMapsInt(final int initialCapacity, final float loadFactor) { super(initialCapacity, loadFactor); @@ -36,24 +36,26 @@ public StringMapsInt(final int initialCapacity, final float loadFactor) { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Associates Integer sq1ID(value) to a String descriptor(key). * - * @param descriptor DOCUMENT ME! - * @param sqlID DOCUMENT ME! + * @param descriptor key + * @param sqlID value + * + * @see #put(java.lang.Object, java.lang.Object) */ public void add(final String descriptor, final int sqlID) { super.put(descriptor, new Integer(sqlID)); } // end add /** - * ///////////////////////////////////////// + * Getter for the Value as a Integer * - * @param descriptor DOCUMENT ME! + * @param descriptor descriptor * - * @return DOCUMENT ME! + * @return IntValue * * @throws Exception DOCUMENT ME! - * @throws java.lang.NullPointerException DOCUMENT ME! + * @throws java.lang.NullPointerException "Entry is not a Integer" or "No entry" */ public int getIntValue(final String descriptor) throws Exception { if (super.containsKey(descriptor)) { @@ -71,11 +73,13 @@ public int getIntValue(final String descriptor) throws Exception { // accomplished } /** - * ///// containsIntKey///////////////////////////////// + * Tests if the specified object is a key in StringMapsInt * - * @param key DOCUMENT ME! + * @param key possible key * - * @return DOCUMENT ME! + * @return true, if the object is a key in StringMapsInt + * + * @see #containsKey(java.lang.Object) */ public boolean containsStringKey(final String key) { return super.containsKey(key); diff --git a/src/main/java/Sirius/util/collections/StringMapsString.java b/src/main/java/Sirius/util/collections/StringMapsString.java index 1f10865..cef61cb 100644 --- a/src/main/java/Sirius/util/collections/StringMapsString.java +++ b/src/main/java/Sirius/util/collections/StringMapsString.java @@ -17,7 +17,7 @@ public class StringMapsString extends java.util.Hashtable { //~ Constructors ----------------------------------------------------------- /** - * --------------------------------------------------------- + * Creates a new StringMapString object */ public StringMapsString() { super(); @@ -26,17 +26,17 @@ public StringMapsString() { /** * Creates a new StringMapsString object. * - * @param initialCapacity DOCUMENT ME! + * @param initialCapacity Capacity when Object is created */ public StringMapsString(final int initialCapacity) { super(initialCapacity); } /** - * --------------------------------------------------------- + * Creates a new StringMapsString object. * - * @param initialCapacity DOCUMENT ME! - * @param loadFactor DOCUMENT ME! + * @param initialCapacity Capacity when Object is created + * @param loadFactor buffer for capacity increase */ public StringMapsString(final int initialCapacity, final float loadFactor) { super(initialCapacity, loadFactor); @@ -45,12 +45,12 @@ public StringMapsString(final int initialCapacity, final float loadFactor) { //~ Methods ---------------------------------------------------------------- /** - * ----------------------------------------------------------- + * Associates a String astring(value) to a String descriptor(key). * - * @param descriptor DOCUMENT ME! - * @param aString DOCUMENT ME! + * @param descriptor key + * @param aString value * - * @throws Exception DOCUMENT ME! + * @throws Exception Contains no Key */ public void add(final String descriptor, final String aString) throws Exception { super.put(descriptor, aString); @@ -61,14 +61,14 @@ public void add(final String descriptor, final String aString) throws Exception } // end add /** - * --------------------------------------------------------- + * Getter for the Value as a String * - * @param descriptor DOCUMENT ME! + * @param descriptor key * - * @return DOCUMENT ME! + * @return StringValue * - * @throws Exception DOCUMENT ME! - * @throws java.lang.NullPointerException DOCUMENT ME! + * @throws Exception + * @throws java.lang.NullPointerException "Entry is no String" or "No Entry" */ public String getStringValue(final String descriptor) throws Exception { if (containsKey(descriptor)) { @@ -84,11 +84,13 @@ public String getStringValue(final String descriptor) throws Exception { throw new java.lang.NullPointerException("No entry :" + descriptor); // NOI18N } /** - * ///// containsIntKey///////////////////////////////// + * Tests if the specified object is a key in StringMapsString * - * @param key DOCUMENT ME! + * @param key possible key * - * @return DOCUMENT ME! + * @return true, if the object is a key in StringMapsString + * + * @see #containsKey(java.lang.Object) */ public boolean containsStringKey(final String key) { return super.containsKey(key); From 1c14a4c6991dcc9b81d15af5e0cef246a61231e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCsel?= Date: Fri, 4 Jan 2013 17:17:40 +0100 Subject: [PATCH 04/34] #9 Java Doc Improvements of Package de.cismet.cismap.commons.jtsgeometryfactories --- .../PostGisGeometryFactory.java | 84 ++++++++++--------- 1 file changed, 46 insertions(+), 38 deletions(-) diff --git a/src/main/java/de/cismet/cismap/commons/jtsgeometryfactories/PostGisGeometryFactory.java b/src/main/java/de/cismet/cismap/commons/jtsgeometryfactories/PostGisGeometryFactory.java index 7c8356b..3bb29de 100644 --- a/src/main/java/de/cismet/cismap/commons/jtsgeometryfactories/PostGisGeometryFactory.java +++ b/src/main/java/de/cismet/cismap/commons/jtsgeometryfactories/PostGisGeometryFactory.java @@ -37,11 +37,11 @@ public PostGisGeometryFactory() { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Getter for PostCompliantDBString * - * @param g DOCUMENT ME! + * @param g Geometry * - * @return DOCUMENT ME! + * @return String "SRID= SRID;Text" */ public static String getPostGisCompliantDbString(final Geometry g) { if (g == null) { @@ -52,24 +52,24 @@ public static String getPostGisCompliantDbString(final Geometry g) { } /** - * DOCUMENT ME! + * Creates new JtsPoint by using point * - * @param point DOCUMENT ME! - * @param geometryFactory DOCUMENT ME! + * @param point point + * @param geometryFactory geometryFactory * - * @return DOCUMENT ME! + * @return point */ private static Point createJtsPoint(final org.postgis.Point point, final GeometryFactory geometryFactory) { return geometryFactory.createPoint(new Coordinate(point.getX(), point.getY())); } /** - * DOCUMENT ME! + * Creates new JtsLineString by using lineString * - * @param lineString DOCUMENT ME! - * @param geometryFactory DOCUMENT ME! + * @param lineString lineString + * @param geometryFactory geometryFactory * - * @return DOCUMENT ME! + * @return LineString */ private static LineString createJtsLineString(final org.postgis.LineString lineString, final GeometryFactory geometryFactory) { @@ -81,12 +81,12 @@ private static LineString createJtsLineString(final org.postgis.LineString lineS } /** - * DOCUMENT ME! + * Creates new JtsLinearRing by using linearRing * - * @param linearRing DOCUMENT ME! - * @param geometryFactory DOCUMENT ME! + * @param linearRing linearRing + * @param geometryFactory geometryFactory * - * @return DOCUMENT ME! + * @return linearRing */ private static LinearRing createJtsLinearRing(final org.postgis.LinearRing linearRing, final GeometryFactory geometryFactory) { @@ -103,12 +103,14 @@ private static LinearRing createJtsLinearRing(final org.postgis.LinearRing linea } /** - * DOCUMENT ME! + * Creates new JtsPolygon by using polygon * - * @param polygon DOCUMENT ME! - * @param geometryFactory DOCUMENT ME! + * @param polygon polygon + * @param geometryFactory geometryFactory * - * @return DOCUMENT ME! + * @return polygon + * + * @see #createJtsLinearRing(org.postgis.LinearRing, com.vividsolutions.jts.geom.GeometryFactory) */ private static Polygon createJtsPolygon(final org.postgis.Polygon polygon, final GeometryFactory geometryFactory) { final int ringcount = polygon.numRings(); @@ -128,12 +130,14 @@ private static Polygon createJtsPolygon(final org.postgis.Polygon polygon, final } /** - * DOCUMENT ME! + * Creates new JtsMultiPoint by using MultiPoint * - * @param multiPoint DOCUMENT ME! - * @param geometryFactory DOCUMENT ME! + * @param multiPoint MultiPoint + * @param geometryFactory geometryFactory * - * @return DOCUMENT ME! + * @return MultiPoint + * + * @see #createJtsPoint(org.postgis.Point, com.vividsolutions.jts.geom.GeometryFactory) */ private static MultiPoint createJtsMultiPoint(final org.postgis.MultiPoint multiPoint, final GeometryFactory geometryFactory) { @@ -151,12 +155,14 @@ private static MultiPoint createJtsMultiPoint(final org.postgis.MultiPoint multi } /** - * DOCUMENT ME! + * Creates new JtsMultiLineString by using MultiLineString * - * @param multiLineString DOCUMENT ME! - * @param geometryFactory DOCUMENT ME! + * @param multiLineString MultiLineString + * @param geometryFactory geometryFactory * - * @return DOCUMENT ME! + * @return MultiLineString + * + * @see #createJtsLineString(org.postgis.LineString, com.vividsolutions.jts.geom.GeometryFactory) */ private static MultiLineString createJtsMultiLineString(final org.postgis.MultiLineString multiLineString, final GeometryFactory geometryFactory) { @@ -174,12 +180,14 @@ private static MultiLineString createJtsMultiLineString(final org.postgis.MultiL } /** - * DOCUMENT ME! + * Creates new JtsMultiPolygon by using MultiPolygon * - * @param multiPolygon DOCUMENT ME! - * @param geometryFactory DOCUMENT ME! + * @param multiPolygon MultiPolygon! + * @param geometryFactory geometryFactory * - * @return DOCUMENT ME! + * @return MultiPolygon + * + * @see #createJtsPolygon(org.postgis.Polygon, com.vividsolutions.jts.geom.GeometryFactory) */ private static MultiPolygon createJtsMultiPolygon(final org.postgis.MultiPolygon multiPolygon, final GeometryFactory geometryFactory) { @@ -197,12 +205,12 @@ private static MultiPolygon createJtsMultiPolygon(final org.postgis.MultiPolygon } /** - * DOCUMENT ME! + * Creates new JtsGeometryCollection by using GeometryCollection * - * @param geometryCollection DOCUMENT ME! - * @param geometryFactory DOCUMENT ME! + * @param geometryCollection GeometryCollection + * @param geometryFactory geometryFactory * - * @return DOCUMENT ME! + * @return GeometryCollection */ private static GeometryCollection createJtsGeometryCollection( final org.postgis.GeometryCollection geometryCollection, @@ -256,11 +264,11 @@ private static GeometryCollection createJtsGeometryCollection( } /** - * DOCUMENT ME! + * Creates new JtsGeometry by using Geometry * - * @param geom DOCUMENT ME! + * @param geom Geometry * - * @return DOCUMENT ME! + * @return Geometry */ public static Geometry createJtsGeometry(final org.postgis.Geometry geom) { final GeometryFactory geometryFactory = new GeometryFactory(new PrecisionModel(PrecisionModel.FLOATING), From 30e3ae1968aa1c063ce2b343c120673e347d517b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCsel?= Date: Fri, 4 Jan 2013 17:32:40 +0100 Subject: [PATCH 05/34] #9 Java Doc Improvements of Package de/cismet/netutil --- src/main/java/de/cismet/netutil/Proxy.java | 109 ++++++++++++--------- 1 file changed, 60 insertions(+), 49 deletions(-) diff --git a/src/main/java/de/cismet/netutil/Proxy.java b/src/main/java/de/cismet/netutil/Proxy.java index 3ee66ce..7447c18 100644 --- a/src/main/java/de/cismet/netutil/Proxy.java +++ b/src/main/java/de/cismet/netutil/Proxy.java @@ -55,7 +55,7 @@ public final class Proxy { //~ Constructors ----------------------------------------------------------- /** - * Creates a new ProxyConfig object. + * Creates a Default Proxy object. */ public Proxy() { this(null, -1, null, null, null, false); @@ -64,34 +64,34 @@ public Proxy() { /** * Creates a new Proxy object. * - * @param host DOCUMENT ME! - * @param port DOCUMENT ME! + * @param host proxyURL + * @param port computerName */ public Proxy(final String host, final int port) { this(host, port, null, null, null, true); } /** - * Creates a new ProxyConfig object. + * Creates a new Proxy object. * - * @param host proxyURL DOCUMENT ME! - * @param port DOCUMENT ME! - * @param username DOCUMENT ME! - * @param password DOCUMENT ME! + * @param host proxyURL + * @param port computerName + * @param username username + * @param password password */ public Proxy(final String host, final int port, final String username, final String password) { this(host, port, username, password, null, true); } /** - * Creates a new ProxyConfig object. + * Creates a new Proxy object. * - * @param host proxyURL DOCUMENT ME! - * @param port computerName DOCUMENT ME! - * @param username DOCUMENT ME! - * @param password DOCUMENT ME! - * @param domain DOCUMENT ME! - * @param enabled DOCUMENT ME! + * @param host proxyURL + * @param port computerName + * @param username username + * @param password password + * @param domain domain + * @param enabled enabled or disabled */ public Proxy(final String host, final int port, @@ -110,41 +110,47 @@ public Proxy(final String host, //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Getter for host * - * @return DOCUMENT ME! + * @return host */ public String getHost() { return host; } /** - * DOCUMENT ME! + * Setter for host * - * @param host DOCUMENT ME! + * @param host host */ public void setHost(final String host) { this.host = ((host == null) || host.isEmpty()) ? null : host; } /** - * DOCUMENT ME! + * Getter for port * - * @return DOCUMENT ME! + * @return port */ public int getPort() { return port; } /** - * DOCUMENT ME! + * Setter for port * - * @param port DOCUMENT ME! + * @param port port */ public void setPort(final int port) { this.port = port; } + /** + * return as String + * + * @return "Proxy: " + host + ":" + port + " | username: " + username + + " | password: " + ((password == null) ? null : "") + " | domain: " + domain + */ @Override public String toString() { return "Proxy: " + host + ":" + port + " | username: " + username + " | password: " // NOI18N @@ -152,86 +158,88 @@ public String toString() { } /** - * DOCUMENT ME! + * Getter for domain * - * @return DOCUMENT ME! + * @return domain */ public String getDomain() { return domain; } /** - * DOCUMENT ME! + * Setter for domain * - * @param domain DOCUMENT ME! + * @param domain domain */ public void setDomain(final String domain) { this.domain = ((domain == null) || domain.isEmpty()) ? null : domain; } /** - * DOCUMENT ME! + * Getter for password * - * @return DOCUMENT ME! + * @return password */ public String getPassword() { return password; } /** - * DOCUMENT ME! + * Setter for password * - * @param password DOCUMENT ME! + * @param password password */ public void setPassword(final String password) { this.password = ((password == null) || password.isEmpty()) ? null : password; } /** - * DOCUMENT ME! + * Getter for username * - * @return DOCUMENT ME! + * @return username */ public String getUsername() { return username; } /** - * DOCUMENT ME! + * Setter for username * - * @param username DOCUMENT ME! + * @param username username */ public void setUsername(final String username) { this.username = ((username == null) || username.isEmpty()) ? null : username; } /** - * DOCUMENT ME! + * Tests whether enabled is true or false * - * @return DOCUMENT ME! + * @return true, if it is enabled */ public boolean isEnabled() { return enabled; } /** - * DOCUMENT ME! + * Enables or disables * - * @param enabled DOCUMENT ME! + * @param enabled true or false */ public void setEnabled(final boolean enabled) { this.enabled = enabled; } /** - * DOCUMENT ME! + * Stores this proxy in the user's preferences. + * + * @see #toPreferences(de.cismet.netutil.Proxy) */ public void toPreferences() { toPreferences(this); } /** - * DOCUMENT ME! + * Clears the Proxy Object */ public static void clear() { final Preferences prefs = Preferences.userNodeForPackage(Proxy.class); @@ -307,9 +315,11 @@ public static void toPreferences(final Proxy proxy) { } /** - * DOCUMENT ME! + * Loads a Proxy instance from System preferences. If there are no host and port proxy + * information null will be returned. If the return value is non-null at least the host and the port is + * initialised. Username, Password and Domain may be null. * - * @return DOCUMENT ME! + * @return the user's proxy settings or null if no settings present */ public static Proxy fromSystem() { if (Boolean.getBoolean(System.getProperty(SYSTEM_PROXY_SET))) { @@ -333,9 +343,9 @@ public static Proxy fromSystem() { } /** - * DOCUMENT ME! + * main * - * @param args DOCUMENT ME! + * @param args args */ // NOTE: use cli library if there shall be more (complex) options @SuppressWarnings("CallToThreadDumpStack") @@ -374,10 +384,11 @@ public static void main(final String[] args) { } /** - * DOCUMENT ME! + * shows Message. + * If there is no System.console it writes the meassage on OptionPane.Else it writes the message on Console as Error or Output. * - * @param message DOCUMENT ME! - * @param error DOCUMENT ME! + * @param message the message + * @param error true if it is a error message,false if not */ private static void showMessage(final String message, final boolean error) { if (System.console() == null) { @@ -396,7 +407,7 @@ private static void showMessage(final String message, final boolean error) { } /** - * DOCUMENT ME! + * print usage */ private static void printUsage() { showMessage("Supported parameters are:\n\n" // NOI18N From ed78119eb93ce4b8bb87dde21852393f6e742e4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCsel?= Date: Fri, 4 Jan 2013 17:35:47 +0100 Subject: [PATCH 06/34] #9 Java Doc Improvements of Package de/cismet.netutil.tunnel --- .../netutil/tunnel/TunnelTargetGroup.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main/java/de/cismet/netutil/tunnel/TunnelTargetGroup.java b/src/main/java/de/cismet/netutil/tunnel/TunnelTargetGroup.java index c074dab..88fb2fc 100644 --- a/src/main/java/de/cismet/netutil/tunnel/TunnelTargetGroup.java +++ b/src/main/java/de/cismet/netutil/tunnel/TunnelTargetGroup.java @@ -37,8 +37,8 @@ public TunnelTargetGroup() { /** * Creates a new TunnelTargetGroup object. * - * @param targetGroupkey DOCUMENT ME! - * @param targetExpressions DOCUMENT ME! + * @param targetGroupkey target Group Key + * @param targetExpressions target Expressions */ public TunnelTargetGroup(final String targetGroupkey, final String[] targetExpressions) { this.targetGroupkey = targetGroupkey; @@ -48,47 +48,47 @@ public TunnelTargetGroup(final String targetGroupkey, final String[] targetExpre //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Getter for targetExpressions * - * @return DOCUMENT ME! + * @return targetExpressions */ public String[] getTargetExpressions() { return targetExpressions; } /** - * DOCUMENT ME! + * Setter for targetExpressions * - * @param targetExpressions DOCUMENT ME! + * @param targetExpressions targetExpressions */ public void setTargetExpressions(final String[] targetExpressions) { this.targetExpressions = targetExpressions; } /** - * DOCUMENT ME! + * Getter for targetGroupkey * - * @return DOCUMENT ME! + * @return targetGroupkey */ public String getTargetGroupkey() { return targetGroupkey; } /** - * DOCUMENT ME! + * Setter for targetGroupkey * - * @param targetGroupkey DOCUMENT ME! + * @param targetGroupkey targetGroupkey */ public void setTargetGroupkey(final String targetGroupkey) { this.targetGroupkey = targetGroupkey; } /** - * DOCUMENT ME! + * Tests whether the String matches or not * - * @param candidate DOCUMENT ME! + * @param candidate given String * - * @return DOCUMENT ME! + * @return true if it matches */ public boolean matches(final String candidate) { for (final String regex : targetExpressions) { From 096160731062841f8b53adca0406b97b99dd22ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCsel?= Date: Fri, 4 Jan 2013 17:49:07 +0100 Subject: [PATCH 07/34] #9 Java Doc Improvements of Package de/cismet/remote --- .../AbstractRESTRemoteControlMethod.java | 23 +++++++++++++++---- .../RESTRemoteControlMethodRegistry.java | 23 ++++++++++--------- .../RESTRemoteControlMethodsApplication.java | 9 ++++++-- 3 files changed, 38 insertions(+), 17 deletions(-) diff --git a/src/main/java/de/cismet/remote/AbstractRESTRemoteControlMethod.java b/src/main/java/de/cismet/remote/AbstractRESTRemoteControlMethod.java index 7c684d3..83ab8ca 100644 --- a/src/main/java/de/cismet/remote/AbstractRESTRemoteControlMethod.java +++ b/src/main/java/de/cismet/remote/AbstractRESTRemoteControlMethod.java @@ -25,11 +25,11 @@ public abstract class AbstractRESTRemoteControlMethod implements RESTRemoteContr /** * Creates a new AbstractRestRemoteControlMethod object. * - * @param port DOCUMENT ME! - * @param path DOCUMENT ME! + * @param port port + * @param path path * - * @throws NullPointerException DOCUMENT ME! - * @throws IllegalArgumentException DOCUMENT ME! + * @throws NullPointerException "path must not be null" + * @throws IllegalArgumentException "path must not be empty" or "path has to start with '/'" */ public AbstractRESTRemoteControlMethod(final int port, final String path) { if (path == null) { @@ -50,16 +50,31 @@ public AbstractRESTRemoteControlMethod(final int port, final String path) { //~ Methods ---------------------------------------------------------------- + /** + * Getter for Port + * + * @return port + */ @Override public int getPort() { return this.port; } + /** + * Getter for Path + * + * @return path + */ @Override public String getPath() { return this.path; } + /** + * return as String + * + * @return Class + name + " path: " + path + " port: " + port + */ @Override public String toString() { return this.getClass().getName() + " path: " + this.path + " port: " + this.port; diff --git a/src/main/java/de/cismet/remote/RESTRemoteControlMethodRegistry.java b/src/main/java/de/cismet/remote/RESTRemoteControlMethodRegistry.java index 9cb6e8c..48ebf3a 100644 --- a/src/main/java/de/cismet/remote/RESTRemoteControlMethodRegistry.java +++ b/src/main/java/de/cismet/remote/RESTRemoteControlMethodRegistry.java @@ -37,11 +37,12 @@ private RESTRemoteControlMethodRegistry() { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * caches RemoteMethods to portMapping * - * @param defaultPort DOCUMENT ME! + * @param defaultPort default port * - * @throws IllegalStateException DOCUMENT ME! + * @throws IllegalStateException "RESTRemoteControlMethods have already been collected. " + + "Call RESTRemoteControlMethodRegistry.clear() to enable new gathering" */ public static synchronized void gatherRemoteMethods(final int defaultPort) { if (!portMapping.isEmpty()) { @@ -75,11 +76,11 @@ public static synchronized void gatherRemoteMethods(final int defaultPort) { } /** - * DOCUMENT ME! + * Gets the Methods of specified Port * - * @param port DOCUMENT ME! + * @param port port * - * @return DOCUMENT ME! + * @return method */ public static synchronized List getMethodsForPort(final int port) { final List methods = portMapping.get(port); @@ -87,25 +88,25 @@ public static synchronized List getMethodsForPort(final } /** - * DOCUMENT ME! + * Gettter for Methodports * - * @return DOCUMENT ME! + * @return Methodports */ public static synchronized Set getMethodPorts() { return new HashSet(portMapping.keySet()); } /** - * DOCUMENT ME! + * Clears the Portmapping */ public static synchronized void clear() { portMapping.clear(); } /** - * DOCUMENT ME! + * Tests whether the map is empty or not * - * @return DOCUMENT ME! + * @return Trueif this map contains no key-value mappings */ public static synchronized boolean hasMethodsInformation() { return portMapping.isEmpty(); diff --git a/src/main/java/de/cismet/remote/RESTRemoteControlMethodsApplication.java b/src/main/java/de/cismet/remote/RESTRemoteControlMethodsApplication.java index 602b313..a9285c4 100644 --- a/src/main/java/de/cismet/remote/RESTRemoteControlMethodsApplication.java +++ b/src/main/java/de/cismet/remote/RESTRemoteControlMethodsApplication.java @@ -49,9 +49,9 @@ public RESTRemoteControlMethodsApplication() { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * collects Service Classes. Collects all available classes for this port. * - * @param portAsString DOCUMENT ME! + * @param portAsString portasString */ private void collectServiceClasses(final String portAsString) { if (this.clazzes.isEmpty()) { @@ -64,6 +64,11 @@ private void collectServiceClasses(final String portAsString) { } } + /** + * Getter for Classes + * + * @return class + */ @Override public synchronized Set> getClasses() { this.collectServiceClasses((String)rc.getProperty(PROP_PORT)); From 3b96ce44a68f28d1dcf72fe5694fc383969a8b63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCsel?= Date: Fri, 4 Jan 2013 18:08:40 +0100 Subject: [PATCH 08/34] #9 Java Doc Improvements of Package de.cismet.tools --- .../cismet/tools/BlacklistClassloading.java | 6 +- src/main/java/de/cismet/tools/FileUtils.java | 86 +++++++++++-------- .../de/cismet/tools/PasswordEncrypter.java | 26 +++--- .../java/de/cismet/tools/PropertyReader.java | 18 ++-- .../java/de/cismet/tools/TextFromFile.java | 8 +- 5 files changed, 80 insertions(+), 64 deletions(-) diff --git a/src/main/java/de/cismet/tools/BlacklistClassloading.java b/src/main/java/de/cismet/tools/BlacklistClassloading.java index 6af8d18..d1ced1e 100644 --- a/src/main/java/de/cismet/tools/BlacklistClassloading.java +++ b/src/main/java/de/cismet/tools/BlacklistClassloading.java @@ -39,9 +39,11 @@ private BlacklistClassloading() { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Tests whether the class is available or not. + * It sends messages to the Logger, if he can't find the class identity(additional he adds the identity on the blacklist), + * if he already has the class on the blacklist or if the classname was null * - * @param classname canonical classname to load + * @param classname classname to load * * @return the class to load or null if class is not found. */ diff --git a/src/main/java/de/cismet/tools/FileUtils.java b/src/main/java/de/cismet/tools/FileUtils.java index dc0f7f7..9496f46 100644 --- a/src/main/java/de/cismet/tools/FileUtils.java +++ b/src/main/java/de/cismet/tools/FileUtils.java @@ -53,34 +53,36 @@ private FileUtils() { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * checks whether the File is a MetaFiles or not * - * @param check DOCUMENT ME! + * @param check File to be tested * - * @return DOCUMENT ME! + * @return true if the tested File is a MetaFile + * + * @see #isMetaFile(java.io.File, int) */ public static boolean isMetaFile(final File check) { return isMetaFile(check, getMode()); } /** - * DOCUMENT ME! + * checks whether the File is a MetaFile of the tested OS or not * - * @param check DOCUMENT ME! - * @param mode DOCUMENT ME! + * @param check File to be tested + * @param mode Number of OS to be tested * - * @return DOCUMENT ME! + * @return true if the tested File is a MetaFile of the tested OS */ public static boolean isMetaFile(final File check, final int mode) { return checkMeta(check.getName(), getMetaEntries(mode)); } /** - * DOCUMENT ME! + * get the MetaEntries for the Meta * - * @param mode DOCUMENT ME! + * @param mode Metanumber * - * @return DOCUMENT ME! + * @return the MetaEntries;By default returns All_Meta_Entries */ private static String[] getMetaEntries(final int mode) { switch (mode) { @@ -116,12 +118,12 @@ private static String[] getMetaEntries(final int mode) { } /** - * DOCUMENT ME! + * Checks whether the File has the Metaentries or not * - * @param filename DOCUMENT ME! - * @param meta DOCUMENT ME! + * @param filename name of the tested File + * @param meta Metaentries to be tested * - * @return DOCUMENT ME! + * @return true if the File has the tested Metaentries;false if it's not */ private static boolean checkMeta(final String filename, final String[] meta) { for (final String s : meta) { @@ -133,9 +135,9 @@ private static boolean checkMeta(final String filename, final String[] meta) { } /** - * DOCUMENT ME! + * gets the Meta to the MetaFile * - * @return DOCUMENT ME! + * @return Meta */ private static int getMode() { final String os = System.getProperty("os.name"); // NOI18N @@ -151,11 +153,11 @@ private static int getMode() { } /** - * DOCUMENT ME! + * gets the name of the File * - * @param file DOCUMENT ME! + * @param file * - * @return DOCUMENT ME! + * @return the FileName */ public static String getName(final File file) { final String nameExt = file.getName(); @@ -185,25 +187,29 @@ public static String getExt(final File file) { } /** - * DOCUMENT ME! + * Tests whether the File only contains MetaFiles or not * - * @param check DOCUMENT ME! + * @param check File to be tested * - * @return DOCUMENT ME! + * @return true, if it only contains MetaFiles + * + * @see {@link #containsOnlyMetaFiles(java.io.File, int)} */ public static boolean containsOnlyMetaFiles(final File check) { return containsOnlyMetaFiles(check, getMode()); } /** - * DOCUMENT ME! + * Tests whether the Directory only contains MetaFiles of one OS + * + * @param check File to be tested + * @param mode Os * - * @param check DOCUMENT ME! - * @param mode DOCUMENT ME! + * @return true, if it only contains MetaFiles of the tested Os * - * @return DOCUMENT ME! - * - * @throws IllegalArgumentException DOCUMENT ME! + * @throws IllegalArgumentException throws IllegalArgumentException if the File isn't a Directory + * + * @see {@link #isMetaFile(java.io.File, int)} */ public static boolean containsOnlyMetaFiles(final File check, final int mode) { if (!check.isDirectory()) { @@ -219,11 +225,12 @@ public static boolean containsOnlyMetaFiles(final File check, final int mode) { return true; } /** - * exception thrown and not handled to avoid logger call if it is necessary to use logger in this class return + * copy the File<\code> + * Note: exception thrown and not handled to avoid logger call if it is necessary to use logger in this class return * boolean and handle exceptions. * - * @param inFile DOCUMENT ME! - * @param outFile DOCUMENT ME! + * @param inFile input File + * @param outFile target File * * @throws FileNotFoundException DOCUMENT ME! * @throws IOException DOCUMENT ME! @@ -250,14 +257,21 @@ public static void copyFile(final File inFile, final File outFile) throws FileNo } /** - * DOCUMENT ME! + * Copys the Directory. It uses the a filtered list of Files contained inside the Directory. If there is any Directory the Method starts recursive * - * @param srcDir DOCUMENT ME! - * @param destDir DOCUMENT ME! - * @param filter DOCUMENT ME! + * @param srcDir Source Directory + * @param destDir Target Directory + * @param filter Filter * @param recursive DOCUMENT ME! * - * @throws FileNotFoundException DOCUMENT ME! + * @throws FileNotFoundException throws FileNotFoundException if: + * + *
    + *
  • the Source File or the Target File does not exist
  • + *
  • the Source File is not a Directory
  • + *
  • the Target File is not a Directory
  • + *
+ * * @throws IOException DOCUMENT ME! */ public static void copyContent( diff --git a/src/main/java/de/cismet/tools/PasswordEncrypter.java b/src/main/java/de/cismet/tools/PasswordEncrypter.java index 80c34a5..5cd2637 100644 --- a/src/main/java/de/cismet/tools/PasswordEncrypter.java +++ b/src/main/java/de/cismet/tools/PasswordEncrypter.java @@ -235,31 +235,31 @@ public void focusGained(final java.awt.event.FocusEvent evt) { } // //GEN-END:initComponents /** - * DOCUMENT ME! + * Focus Gained Password2 * - * @param evt DOCUMENT ME! + * @param evt Event */ - private void pwfPassword2FocusGained(final java.awt.event.FocusEvent evt) { //GEN-FIRST:event_pwfPassword2FocusGained + private void pwfPassword2FocusGained(final java.awt.event.FocusEvent evt) {//GEN-FIRST:event_pwfPassword2FocusGained pwfPassword2.setSelectionStart(0); pwfPassword2.setSelectionEnd(pwfPassword1.getPassword().length); - } //GEN-LAST:event_pwfPassword2FocusGained + }//GEN-LAST:event_pwfPassword2FocusGained /** - * DOCUMENT ME! + * Focus Gained Password1 * - * @param evt DOCUMENT ME! + * @param evt Event */ - private void pwfPassword1FocusGained(final java.awt.event.FocusEvent evt) { //GEN-FIRST:event_pwfPassword1FocusGained + private void pwfPassword1FocusGained(final java.awt.event.FocusEvent evt) {//GEN-FIRST:event_pwfPassword1FocusGained pwfPassword1.setSelectionStart(0); pwfPassword1.setSelectionEnd(pwfPassword1.getPassword().length); - } //GEN-LAST:event_pwfPassword1FocusGained + }//GEN-LAST:event_pwfPassword1FocusGained /** - * DOCUMENT ME! + * Starter * - * @param evt DOCUMENT ME! + * @param evt Event */ - private void cmdGoActionPerformed(final java.awt.event.ActionEvent evt) { //GEN-FIRST:event_cmdGoActionPerformed + private void cmdGoActionPerformed(final java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdGoActionPerformed final String p1 = new String(pwfPassword1.getPassword()); final String p2 = new String(pwfPassword2.getPassword()); if (p1.equals(p2)) { @@ -296,10 +296,10 @@ private void cmdGoActionPerformed(final java.awt.event.ActionEvent evt) { pwfPassword1.setText(""); // NOI18N pwfPassword2.setText(""); // NOI18N } - } //GEN-LAST:event_cmdGoActionPerformed + }//GEN-LAST:event_cmdGoActionPerformed /** - * DOCUMENT ME! + * main * * @param args the command line arguments * diff --git a/src/main/java/de/cismet/tools/PropertyReader.java b/src/main/java/de/cismet/tools/PropertyReader.java index 2bbe9e5..ee73dd5 100644 --- a/src/main/java/de/cismet/tools/PropertyReader.java +++ b/src/main/java/de/cismet/tools/PropertyReader.java @@ -39,9 +39,9 @@ public class PropertyReader { /** * Creates a new PropertyReader object. * - * @param filename DOCUMENT ME! + * @param filename filename * - * @throws IllegalArgumentException DOCUMENT ME! + * @throws IllegalArgumentException If filename is Null */ public PropertyReader(final String filename) { if ((filename == null) || (filename.length() < 1)) { @@ -69,29 +69,29 @@ public PropertyReader(final String filename) { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * get the Property. * - * @param key DOCUMENT ME! + * @param key key * - * @return DOCUMENT ME! + * @return the Property of the properties */ public final String getProperty(final String key) { return properties.getProperty(key); } /** - * DOCUMENT ME! + * get the Filename. * - * @return the filename + * @return filename */ public String getFilename() { return filename; } /** - * DOCUMENT ME! + * get the Internal Propeties. * - * @return DOCUMENT ME! + * @return properties */ public Properties getInternalProperties() { return properties; diff --git a/src/main/java/de/cismet/tools/TextFromFile.java b/src/main/java/de/cismet/tools/TextFromFile.java index db6c523..0c5e344 100644 --- a/src/main/java/de/cismet/tools/TextFromFile.java +++ b/src/main/java/de/cismet/tools/TextFromFile.java @@ -66,18 +66,18 @@ public TextFromFile(final String filepath) { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Getter for Text. Converts Byte to String * - * @return DOCUMENT ME! + * @return data */ public String getText() { return new String(data); } /** - * DOCUMENT ME! + * Getter for Text. * - * @return DOCUMENT ME! + * @return Vector words */ public Vector getWordVector() { final Vector words = new Vector(10, 10); From 9105ad88960b66d92053b5d9fa271e10a27705bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCsel?= Date: Mon, 7 Jan 2013 16:30:03 +0100 Subject: [PATCH 09/34] #9 Java Doc Improvements of package de.cismet.tools --- src/main/java/de/cismet/tools/Base64.java | 2 +- .../cismet/tools/BlacklistClassloading.java | 4 +- src/main/java/de/cismet/tools/Calculator.java | 2 +- .../de/cismet/tools/CismetThreadPool.java | 19 +-- .../java/de/cismet/tools/ConnectionInfo.java | 26 ++-- .../de/cismet/tools/CurrentStackTrace.java | 2 +- .../java/de/cismet/tools/DebugSwitches.java | 6 +- src/main/java/de/cismet/tools/Equals.java | 12 +- src/main/java/de/cismet/tools/FileUtils.java | 127 ++++++++++++----- src/main/java/de/cismet/tools/JnlpTools.java | 2 +- .../de/cismet/tools/LinkedProperties.java | 133 +++++++++++++++++- .../cismet/tools/NumberStringComparator.java | 12 +- .../de/cismet/tools/PasswordEncrypter.java | 103 +++++++++++--- .../tools/PasswordEncrypterException.java | 2 +- .../cismet/tools/PropertyEqualsProvider.java | 2 +- .../java/de/cismet/tools/PropertyReader.java | 8 +- .../java/de/cismet/tools/ScriptRunner.java | 48 +++---- src/main/java/de/cismet/tools/Sorter.java | 77 ++++++---- .../de/cismet/tools/StaticDebuggingTools.java | 8 +- .../de/cismet/tools/StaticDecimalTools.java | 18 +-- .../java/de/cismet/tools/StaticHtmlTools.java | 30 ++-- .../java/de/cismet/tools/StaticXMLTools.java | 26 ++-- .../java/de/cismet/tools/StringTools.java | 8 +- 23 files changed, 471 insertions(+), 206 deletions(-) diff --git a/src/main/java/de/cismet/tools/Base64.java b/src/main/java/de/cismet/tools/Base64.java index 38d49c6..a74dae2 100644 --- a/src/main/java/de/cismet/tools/Base64.java +++ b/src/main/java/de/cismet/tools/Base64.java @@ -8,7 +8,7 @@ package de.cismet.tools; /** - * DOCUMENT ME! + * Base64 Converter * * @author martin.scholl@cismet.de * @version $Revision$, $Date$ diff --git a/src/main/java/de/cismet/tools/BlacklistClassloading.java b/src/main/java/de/cismet/tools/BlacklistClassloading.java index d1ced1e..90ae250 100644 --- a/src/main/java/de/cismet/tools/BlacklistClassloading.java +++ b/src/main/java/de/cismet/tools/BlacklistClassloading.java @@ -13,7 +13,7 @@ import java.util.Map; /** - * DOCUMENT ME! + * Blacklist * * @author srichter * @version $Revision$, $Date$ @@ -30,7 +30,7 @@ public final class BlacklistClassloading { /** * Creates a new BlacklistClassloading object. * - * @throws AssertionError DOCUMENT ME! + * @throws AssertionError Assertion failed */ private BlacklistClassloading() { throw new AssertionError(); diff --git a/src/main/java/de/cismet/tools/Calculator.java b/src/main/java/de/cismet/tools/Calculator.java index fcd2d7e..911d833 100644 --- a/src/main/java/de/cismet/tools/Calculator.java +++ b/src/main/java/de/cismet/tools/Calculator.java @@ -8,7 +8,7 @@ package de.cismet.tools; /** - * DOCUMENT ME! + * Calculator * * @author therter * @version $Revision$, $Date$ diff --git a/src/main/java/de/cismet/tools/CismetThreadPool.java b/src/main/java/de/cismet/tools/CismetThreadPool.java index ae908a9..882f391 100644 --- a/src/main/java/de/cismet/tools/CismetThreadPool.java +++ b/src/main/java/de/cismet/tools/CismetThreadPool.java @@ -36,7 +36,7 @@ public final class CismetThreadPool { * Executes the given runnable in the applications common cached threadpool. Notice: It is smarter to pass plain * Runnables instead of Threads as arguments, as one purpose of this pool is minimizing thread creation overhead. * - * @param command DOCUMENT ME! + * @param command given runnable */ public static void execute(final Runnable command) { WORKER_POOL.execute(command); @@ -46,27 +46,29 @@ public static void execute(final Runnable command) { * Executes the given runnable in the applications threadpool. All threads, which will be started with this method * will be run sequentially. * - * @param command DOCUMENT ME! + * @param command given runnable */ public static void executeSequentially(final Runnable command) { SINGLE_WORKER_POOL.execute(command); } /** - * DOCUMENT ME! + * Submits the given runnable in the applications common cached threadpool. * - * @param command DOCUMENT ME! + * @param command given runnable * - * @return DOCUMENT ME! + * @return a Future representing pending completion of the runnable */ public static Future submit(final Runnable command) { return WORKER_POOL.submit(command); } /** - * DOCUMENT ME! + * Attempts to stop all actively executing tasks, halts the + * processing of waiting tasks, and returns a list of the tasks + * that were awaiting execution. * - * @return DOCUMENT ME! + * @return list */ public static List shutdownNow() { final List list = SINGLE_WORKER_POOL.shutdownNow(); @@ -75,7 +77,8 @@ public static List shutdownNow() { } /** - * DOCUMENT ME! + * Initiates an orderly shutdown in which previously submitted + * tasks are executed, but no new tasks will be accepted. */ public static void shutdown() { SINGLE_WORKER_POOL.shutdown(); diff --git a/src/main/java/de/cismet/tools/ConnectionInfo.java b/src/main/java/de/cismet/tools/ConnectionInfo.java index 562e748..734941e 100644 --- a/src/main/java/de/cismet/tools/ConnectionInfo.java +++ b/src/main/java/de/cismet/tools/ConnectionInfo.java @@ -15,7 +15,7 @@ import org.jdom.Element; /** - * Bean Klasse zum speichern von Connection Infos. + * Bean Class to save Connection Infos. * * @author hell * @version $Revision$, $Date$ @@ -40,7 +40,7 @@ public ConnectionInfo() { /** * Creates a new ConnectionInfo object. * - * @param element DOCUMENT ME! + * @param element Elemtent */ public ConnectionInfo(final Element element) { // throws NullPointerException{ driver = element.getChild("driverClass").getTextTrim(); // NOI18N @@ -52,7 +52,7 @@ public ConnectionInfo(final Element element) { // throws NullPointe //~ Methods ---------------------------------------------------------------- /** - * Gibt die Driver Klasse zur\u00FCck. + * Returns the DriverClass * * @return DriverClass */ @@ -61,7 +61,7 @@ public String getDriver() { } /** - * Setzt die Treiber Klasse. + * Sets the DriverClass * * @param driver Driver Class */ @@ -70,7 +70,7 @@ public void setDriver(final String driver) { } /** - * Liefert die DB Url. + * Returns the DB Url * * @return DB Url */ @@ -79,7 +79,7 @@ public String getUrl() { } /** - * Setzt die DB Url. + * Sets the DB Url * * @param url DB Url */ @@ -88,7 +88,7 @@ public void setUrl(final String url) { } /** - * Liefert den User. + * Getter for User. * * @return DB USer */ @@ -97,7 +97,7 @@ public String getUser() { } /** - * Setzt den User. + * Setter for User. * * @param user DB User */ @@ -106,9 +106,9 @@ public void setUser(final String user) { } /** - * Liefert Passwort. + * Returns Password. * - * @return Pass + * @return Password */ public String getPass() { if ((pass != null) && pass.startsWith(PasswordEncrypter.CRYPT_PREFIX)) { @@ -119,7 +119,7 @@ public String getPass() { } /** - * Setzt Passwort. + * Sets Password * * @param pass Password */ @@ -128,9 +128,9 @@ public void setPass(final String pass) { } /** - * DOCUMENT ME! + * Getter for Element * - * @return DOCUMENT ME! + * @return Element */ public Element getElement() { final Element e = new Element("dbConnectionInfo"); // NOI18N diff --git a/src/main/java/de/cismet/tools/CurrentStackTrace.java b/src/main/java/de/cismet/tools/CurrentStackTrace.java index 635649b..6f50ef3 100644 --- a/src/main/java/de/cismet/tools/CurrentStackTrace.java +++ b/src/main/java/de/cismet/tools/CurrentStackTrace.java @@ -12,7 +12,7 @@ package de.cismet.tools; /** - * DOCUMENT ME! + * CurrentStackTrace * * @author thorsten * @version $Revision$, $Date$ diff --git a/src/main/java/de/cismet/tools/DebugSwitches.java b/src/main/java/de/cismet/tools/DebugSwitches.java index 6d8639a..c9914ba 100644 --- a/src/main/java/de/cismet/tools/DebugSwitches.java +++ b/src/main/java/de/cismet/tools/DebugSwitches.java @@ -12,7 +12,7 @@ package de.cismet.tools; /** - * DOCUMENT ME! + * debug Switches * * @author thorsten * @version $Revision$, $Date$ @@ -38,9 +38,9 @@ private DebugSwitches() { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Getter for Instance * - * @return DOCUMENT ME! + * @return instance */ public static DebugSwitches getInstance() { if (instance == null) { diff --git a/src/main/java/de/cismet/tools/Equals.java b/src/main/java/de/cismet/tools/Equals.java index 0aac037..20468fd 100644 --- a/src/main/java/de/cismet/tools/Equals.java +++ b/src/main/java/de/cismet/tools/Equals.java @@ -32,10 +32,10 @@ private Equals() { * Compares the bean properties of given objects. This operation is equivalent to calling * {@link #beanDeepEqual(java.lang.Object, java.lang.Object, java.lang.String[])} with a null String[]. * - * @param o DOCUMENT ME! - * @param o2 DOCUMENT ME! + * @param o object one + * @param o2 object two * - * @return DOCUMENT ME! + * @return true, if obeject one and object two deliver the same result for every bean getter * * @see #beanDeepEqual(java.lang.Object, java.lang.Object, java.lang.String[]) */ @@ -88,8 +88,8 @@ public static boolean beanDeepEqual(final Object o, final Object o2, final Strin /** * Tests if the given array contains the given name. * - * @param name DOCUMENT ME! - * @param array DOCUMENT ME! + * @param name searched name + * @param array given array * * @return true, if the array contains the name, false otherwise, also false if the array is null */ @@ -120,7 +120,7 @@ private static boolean contains(final String name, final String... array) { *
  • * * - * @param m DOCUMENT ME! + * @param m given method * * @return true if all the requirements listed above are met, false otherwise */ diff --git a/src/main/java/de/cismet/tools/FileUtils.java b/src/main/java/de/cismet/tools/FileUtils.java index 9496f46..691c6b0 100644 --- a/src/main/java/de/cismet/tools/FileUtils.java +++ b/src/main/java/de/cismet/tools/FileUtils.java @@ -21,7 +21,7 @@ import java.util.jar.JarFile; /** - * DOCUMENT ME! + * FileUtils Class * * @author mscholl * @version 1.3 @@ -53,7 +53,7 @@ private FileUtils() { //~ Methods ---------------------------------------------------------------- /** - * checks whether the File is a MetaFiles or not + * Checks whether the File is a MetaFiles or not * * @param check File to be tested * @@ -66,7 +66,7 @@ public static boolean isMetaFile(final File check) { } /** - * checks whether the File is a MetaFile of the tested OS or not + * Checks whether the File is a MetaFile of the tested OS or not * * @param check File to be tested * @param mode Number of OS to be tested @@ -135,7 +135,7 @@ private static boolean checkMeta(final String filename, final String[] meta) { } /** - * gets the Meta to the MetaFile + * Tests which OS the System is running. * * @return Meta */ @@ -153,11 +153,11 @@ private static int getMode() { } /** - * gets the name of the File + * Getter for the name of the File * - * @param file + * @param file given File * - * @return the FileName + * @return FileName */ public static String getName(final File file) { final String nameExt = file.getName(); @@ -170,11 +170,11 @@ public static String getName(final File file) { } /** - * DOCUMENT ME! + * Getter for the Filestype * - * @param file DOCUMENT ME! + * @param file given file * - * @return DOCUMENT ME! + * @return Filetype as String */ public static String getExt(final File file) { final String nameExt = file.getName(); @@ -200,7 +200,7 @@ public static boolean containsOnlyMetaFiles(final File check) { } /** - * Tests whether the Directory only contains MetaFiles of one OS + * Tests whether the Directory only contains MetaFiles of the given OS * * @param check File to be tested * @param mode Os @@ -209,7 +209,7 @@ public static boolean containsOnlyMetaFiles(final File check) { * * @throws IllegalArgumentException throws IllegalArgumentException if the File isn't a Directory * - * @see {@link #isMetaFile(java.io.File, int)} + * @see #isMetaFile(java.io.File, int) */ public static boolean containsOnlyMetaFiles(final File check, final int mode) { if (!check.isDirectory()) { @@ -225,15 +225,16 @@ public static boolean containsOnlyMetaFiles(final File check, final int mode) { return true; } /** - * copy the File<\code> + * Copies the File * Note: exception thrown and not handled to avoid logger call if it is necessary to use logger in this class return * boolean and handle exceptions. * * @param inFile input File * @param outFile target File * - * @throws FileNotFoundException DOCUMENT ME! - * @throws IOException DOCUMENT ME! + * @throws FileNotFoundException FileNotFoundException + * @throws IOException IOException + * */ public static void copyFile(final File inFile, final File outFile) throws FileNotFoundException, IOException { FileInputStream fis = null; @@ -262,17 +263,17 @@ public static void copyFile(final File inFile, final File outFile) throws FileNo * @param srcDir Source Directory * @param destDir Target Directory * @param filter Filter - * @param recursive DOCUMENT ME! + * @param recursive recursive * * @throws FileNotFoundException throws FileNotFoundException if: * *
      - *
    • the Source File or the Target File does not exist
    • *
    • the Source File is not a Directory
    • *
    • the Target File is not a Directory
    • *
    * - * @throws IOException DOCUMENT ME! + * @throws IOException IOException + * */ public static void copyContent( final File srcDir, @@ -305,12 +306,17 @@ public static void copyContent( } /** - * DOCUMENT ME! + * Deletes the Content of the Given Folder. * - * @param srcDir DOCUMENT ME! - * @param recursive DOCUMENT ME! + * @param srcDir given Directory + * @param recursive recursive * - * @throws IOException DOCUMENT ME! + * @throws IOException IOException + *
      + *
    • source dir is not a directory
    • + *
    • a File couldn't be deleted
    • + *
    • a Folder couldn't be deleted
    • + *
    */ public static void deleteContent(final File srcDir, final boolean recursive) throws IOException { if (!srcDir.isDirectory()) { @@ -339,11 +345,15 @@ public static void deleteContent(final File srcDir, final boolean recursive) thr } /** - * DOCUMENT ME! + * Deletes the Given Folder * - * @param srcDir DOCUMENT ME! + * @param srcDir given Directory * - * @throws IOException DOCUMENT ME! + * @throws IOException IOException + *
      + *
    • Source Directory is not a Directory
    • + *
    • Could not delete File
    • + *
    */ public static void deleteDir(final File srcDir) throws IOException { if (!srcDir.isDirectory()) { @@ -360,13 +370,21 @@ public static void deleteDir(final File srcDir) throws IOException { } /** - * DOCUMENT ME! + * Extracts given Jar File to given Folder * - * @param jar DOCUMENT ME! - * @param dest DOCUMENT ME! - * @param filter DOCUMENT ME! + * @param jar Jar File + * @param dest Directory + * @param filter filter * - * @throws IOException DOCUMENT ME! + * @throws IOException IOException + *
      + *
    • dest dir does not exist
    • + *
    • jar file does not exist
    • + *
    • dest dir is not a directory
    • + *
    • cannot write to dest directory
    • + *
    • cannot read jar file
    • + *
    • culd not create dir
    • + *
    */ public static void extractJar(final File jar, final File dest, final FileFilter filter) throws IOException { if (!dest.exists()) { @@ -424,7 +442,7 @@ public static void extractJar(final File jar, final File dest, final FileFilter //~ Inner Classes ---------------------------------------------------------- /** - * DOCUMENT ME! + * Inner Class JarFilter * * @version $Revision$, $Date$ */ @@ -432,6 +450,13 @@ public static final class JarFilter implements FileFilter { //~ Methods ------------------------------------------------------------ + /** + * Tests whether the given File is .jar File or not + * + * @param file given File + * + * @return true, if the File is a .jar File + */ @Override public boolean accept(final File file) { return getExt(file).equalsIgnoreCase("jar"); // NOI18N @@ -439,7 +464,7 @@ public boolean accept(final File file) { } /** - * DOCUMENT ME! + * Inner Class DirandJarFilter * * @version $Revision$, $Date$ */ @@ -447,6 +472,13 @@ public static final class DirAndJarFilter implements FileFilter { //~ Methods ------------------------------------------------------------ + /** + * Tests whether the File is a Directory or a .jar File + * + * @param file given File + * + * @return true, if the File is a .jar File or a Directory + */ @Override public boolean accept(final File file) { return file.isDirectory() || getExt(file).equalsIgnoreCase("jar"); // NOI18N @@ -454,7 +486,7 @@ public boolean accept(final File file) { } /** - * DOCUMENT ME! + * Inner Class DirectoryFilter * * @version $Revision$, $Date$ */ @@ -462,6 +494,14 @@ public static final class DirectoryFilter implements FileFilter { //~ Methods ------------------------------------------------------------ + /** + * Tests whether the File is Directory or not. + * + * @param file given File + * + * @return true, if the File is a Directory + */ + @Override public boolean accept(final File file) { return file.isDirectory(); @@ -469,7 +509,7 @@ public boolean accept(final File file) { } /** - * DOCUMENT ME! + * Inner Class FilesFilter * * @version $Revision$, $Date$ */ @@ -477,6 +517,14 @@ public static final class FilesFilter implements FileFilter { //~ Methods ------------------------------------------------------------ + /** + * Tests whether the File is Directory or not. + * + * @param file given File + * + * @return true, if the File is a Directory + */ + @Override public boolean accept(final File file) { return !file.isDirectory(); @@ -484,14 +532,21 @@ public boolean accept(final File file) { } /** - * DOCUMENT ME! + * Inner Class MetaInfFilter * * @version $Revision$, $Date$ */ public static final class MetaInfFilter implements FileFilter { //~ Methods ------------------------------------------------------------ - + + /** + * Tests whether the File is Meta File or not. + * + * @param file given File + * + * @return true, if the File is a Meta File + */ @Override public boolean accept(final File file) { return !file.getAbsolutePath().contains(File.separator + "META-INF"); // NOI18N diff --git a/src/main/java/de/cismet/tools/JnlpTools.java b/src/main/java/de/cismet/tools/JnlpTools.java index 1d7f1d5..a280958 100644 --- a/src/main/java/de/cismet/tools/JnlpTools.java +++ b/src/main/java/de/cismet/tools/JnlpTools.java @@ -10,7 +10,7 @@ import java.util.Locale; /** - * DOCUMENT ME! + * JnlpTools Class * * @author martin.scholl@cismet.de * @version $Revision$, $Date$ diff --git a/src/main/java/de/cismet/tools/LinkedProperties.java b/src/main/java/de/cismet/tools/LinkedProperties.java index 715edd9..8c580a7 100644 --- a/src/main/java/de/cismet/tools/LinkedProperties.java +++ b/src/main/java/de/cismet/tools/LinkedProperties.java @@ -20,7 +20,7 @@ import java.util.Set; /** - * DOCUMENT ME! + * Linked Properties * * @author thorsten * @version $Revision$, $Date$ @@ -32,97 +32,209 @@ public class LinkedProperties extends Properties { private final LinkedHashMap map = new LinkedHashMap(); //~ Methods ---------------------------------------------------------------- - + + /** + * Associates a given value with a given keyvalue associated with key, or + * null if there was no mapping for key. + * (A null return can also indicate that the map + * previously associated null with key.) + */ + @Override public synchronized Object put(final Object key, final Object value) { return map.put(key, value); } + /** + * Returns the value for the given key + * + * @param key + * + * @return the associated value. Returns null, if the is no mapping for this key. + */ @Override public synchronized Object get(final Object key) { return map.get(key); } + /** + * Removes every mapping of this map + */ + @Override public synchronized void clear() { map.clear(); } + /** + * @throws UnsupportedOperationException + */ @Override public synchronized Object clone() { throw new UnsupportedOperationException(); } + /** + * Tests whether there is any mapping with this value or not + * + * @param value value whose presence in this map is to be tested + * + * @return True, if there is a key with this value + */ @Override public boolean containsValue(final Object value) { return map.containsValue(value); } + /** + * Tests whether there is any mapping with this value or not + * + * @param value value whose presence in this map is to be tested + * + * @return True, if there is a key with this value + */ + @Override public synchronized boolean contains(final Object value) { return containsValue(value); } + /** + * Tests whether the specified key is in the map or not + * + * @param key key whose presence in this map is to be tested + * + * @return True, if there is a key + */ + @Override public synchronized boolean containsKey(final Object key) { return map.containsKey(key); } + /** + * Returns all values. Uses an Iterator over all elements. + * + * @return every value in this map + */ @Override public synchronized Enumeration elements() { return new IteratorEnumeration(map.values().iterator()); } + /** + * Returns a Set view of the mappings contained in this map. + * + * @return Set + */ @Override public Set entrySet() { return map.entrySet(); } + /** + * @throws UnsupportedOperationException + */ + @Override public synchronized boolean equals(final Object o) { throw new UnsupportedOperationException(); } + /** + * Tests whether there is any mapping on the map or not + * + * @return true, if there is no mapping + */ @Override public synchronized boolean isEmpty() { return map.isEmpty(); } + /** + * Returns all keys. Uses an Iterator over all elements. + * + * @return every key in this map + */ @Override public synchronized Enumeration keys() { return new IteratorEnumeration(map.keySet().iterator()); } + /** + * Returns a Set view of the keys contained in this map. + * + * @return Set + */ @Override public Set keySet() { return map.keySet(); } + /** + * @throws UnsupportedOperationException + */ @Override public Enumeration propertyNames() { throw new UnsupportedOperationException(); } + /** + * Copies all of the mappings from the specified map to this map. + * These mappings will replace any mappings that this map had for + * any of the keys currently in the specified map + * + * @param t map + */ @Override public synchronized void putAll(final Map t) { map.putAll(t); } + /** + * Removes specified key + * @param key key + * @return the previous value associated with key, or + * null if there was no mapping for key. + */ @Override public synchronized Object remove(final Object key) { return map.remove(key); } + /** + * Returns the number of key-value mappings in this map. + * + * @return the number of key-value mappings in this map + */ @Override public synchronized int size() { return map.size(); } + /** + * @throws UnsupportedOperationException + */ @Override public Collection values() { throw new UnsupportedOperationException(); } + /** + * Searches for the property with the specified key in this property list. + * If the key is not found in this property list, the default property list, + * and its defaults, recursively, are then checked. The method returns + * null if the property is not found. + * + * @param key the property key + * + * @return the value in this property list with the specified key value. + */ @Override public String getProperty(final String key) { final Object oval = get(key); @@ -132,7 +244,7 @@ public String getProperty(final String key) { } /** - * DOCUMENT ME! + * IteratorEnumeration * * @version $Revision$, $Date$ */ @@ -147,9 +259,9 @@ class IteratorEnumeration implements Enumeration { /** * Creates a new IteratorEnumeration object. * - * @param i DOCUMENT ME! + * @param i Iterator * - * @throws IllegalArgumentException DOCUMENT ME! + * @throws IllegalArgumentException Iterator is null */ public IteratorEnumeration(final Iterator i) { if (i == null) { @@ -160,11 +272,22 @@ public IteratorEnumeration(final Iterator i) { //~ Methods ---------------------------------------------------------------- + /** + * Tests whether the Iterator as more Elemtents or not. + * + * @return True, if the Iterator has more Elements. + */ @Override public boolean hasMoreElements() { return iterator.hasNext(); } + /** + * Returns the next element in the iteration. + * + * @return the next element in the iteration + * @throws NoSuchElementException if the iteration has no more elements + */ @Override public Object nextElement() { return iterator.next(); diff --git a/src/main/java/de/cismet/tools/NumberStringComparator.java b/src/main/java/de/cismet/tools/NumberStringComparator.java index 2b0f2f1..0b80d16 100644 --- a/src/main/java/de/cismet/tools/NumberStringComparator.java +++ b/src/main/java/de/cismet/tools/NumberStringComparator.java @@ -13,8 +13,8 @@ package de.cismet.tools; /** - * Comparator f\u00FCr Inhalte die Zahlen und Strings fassen k\u00F6nnen
    - * Es wird folgenderma\u00DFem sortiert:
    + * Comperator for Objects, which can contain Numbers and Strings.
    + * It will be sorted in the following form:
    * 1
    * 2
    * 3
    @@ -56,12 +56,12 @@ public NumberStringComparator() { //~ Methods ---------------------------------------------------------------- /** - * Vergleichsfunktion. + * Compare Methode * - * @param o1 erstes Objekt - * @param o2 zweites Objekt + * @param o1 Object one + * @param o2 object two * - * @return Vergleichsergebniss + * @return value of the Comparation */ @Override public int compare(final Object o1, final Object o2) { diff --git a/src/main/java/de/cismet/tools/PasswordEncrypter.java b/src/main/java/de/cismet/tools/PasswordEncrypter.java index 5cd2637..d426f38 100644 --- a/src/main/java/de/cismet/tools/PasswordEncrypter.java +++ b/src/main/java/de/cismet/tools/PasswordEncrypter.java @@ -38,7 +38,7 @@ import javax.swing.UIManager; /** - * DOCUMENT ME! + * Applet Password Encrypter * * @author thorsten.hell@cismet.de * @author martin.scholl@cismet.de @@ -303,7 +303,7 @@ private void cmdGoActionPerformed(final java.awt.event.ActionEvent evt) {//GEN-F * * @param args the command line arguments * - * @throws Exception DOCUMENT ME! + * @throws Exception */ public static void main(final String[] args) throws Exception { java.awt.EventQueue.invokeLater(new Runnable() { @@ -321,11 +321,11 @@ public void run() { } /** - * DOCUMENT ME! + * Decrypts String with BlowfishEasy * - * @param code DOCUMENT ME! + * @param code String that should get decrypted * - * @return DOCUMENT ME! + * @return Return decrypted code or null if code was set to null * * @throws PasswordEncrypterException DOCUMENT ME! */ @@ -341,11 +341,11 @@ public static String decryptString(String code) throws PasswordEncrypterExceptio } /** - * DOCUMENT ME! + * Encrypts a specified String using BlowfishEasy. * - * @param pwd DOCUMENT ME! + * @param pwd String that shoudl get encrypted * - * @return DOCUMENT ME! + * @return encrypted String * * @throws PasswordEncrypterException DOCUMENT ME! */ @@ -527,15 +527,15 @@ public static char[] decrypt(final char[] string, final boolean wipeInput) throw } /** - * DOCUMENT ME! + * Applies Cipher * - * @param bytes string DOCUMENT ME! - * @param mode DOCUMENT ME! + * @param bytes string + * @param mode mode * - * @return DOCUMENT ME! + * @return byte * - * @throws IllegalArgumentException DOCUMENT ME! - * @throws PasswordEncrypterException DOCUMENT ME! + * @throws IllegalArgumentException given byte is null + * @throws PasswordEncrypterException cannot process String mode */ private static byte[] applyCipher(final byte[] bytes, final int mode) { if (bytes == null) { @@ -570,11 +570,15 @@ private static byte[] applyCipher(final byte[] bytes, final int mode) { } /** - * DOCUMENT ME! + * Getter for Master Password * - * @return DOCUMENT ME! + * @return masterpassword as Char[] * - * @throws PasswordEncrypterException DOCUMENT ME! + * @throws PasswordEncrypterException + *
      + *
    • PasswordEncrypter properties not present.
    • + *
    • cannot read master password from properties, not set?
    • + *
    */ private static char[] getMasterPw() throws PasswordEncrypterException { final InputStream peStream = PasswordEncrypter.class.getResourceAsStream("PasswordEncrypter.properties"); // NOI18N @@ -604,11 +608,14 @@ private static char[] getMasterPw() throws PasswordEncrypterException { } /** - * Always 8 bytes. + * Get Salt.Always 8 bytes. + * Uses Default Salt, if Salt not set. + * If Salt is shorter then eight bytes the rest of the Salt will filled with default Salt. + * If Salt is too long, returns only the first eight bytes * - * @return DOCUMENT ME! + * @return salt * - * @throws PasswordEncrypterException DOCUMENT ME! + * @throws PasswordEncrypterException PasswordEncrypter properties not present */ private static byte[] getSalt() throws PasswordEncrypterException { final InputStream peStream = PasswordEncrypter.class.getResourceAsStream("PasswordEncrypter.properties"); // NOI18N @@ -839,7 +846,7 @@ public static byte[] safeRead(final InputStream propertyStream, final char[] pro //~ Inner Classes ---------------------------------------------------------- /** - * DOCUMENT ME! + * FocusTraversalOrder * * @version $Revision$, $Date$ */ @@ -865,13 +872,31 @@ public FocusTraversalOrder() { //~ Methods ------------------------------------------------------------ + /** + * Returns the following Component of the specified Component + * If the specified Component is the Last, Returns the First Component + * + * @param aContainer Container + * @param aComponent Component + * + * @return following Component + */ @Override public Component getComponentAfter(final Container aContainer, final Component aComponent) { final int index = (order.indexOf(aComponent) + 1) % order.size(); return order.get(index); } - + + /** + * Returns the previous Component of the specified Component + * If the specified Component is the First, Returns the Last Component + * + * @param aContainer Container + * @param aComponent Component + * + * @return previous Component + */ @Override public Component getComponentBefore(final Container aContainer, final Component aComponent) { int index = order.indexOf(aComponent) - 1; @@ -882,16 +907,37 @@ public Component getComponentBefore(final Container aContainer, final Component return order.get(index); } + /** + * Returns the First Component + * + * @param aContainer Container + * + * @return Component + */ @Override public Component getFirstComponent(final Container aContainer) { return order.get(0); } + /** + * Returns the Last Component + * + * @param aContainer Container + * + * @return Component + */ @Override public Component getLastComponent(final Container aContainer) { return order.get(order.size() - 1); } + /** + * Returns the First Component + * + * @param aContainer Container + * + * @return Component + */ @Override public Component getDefaultComponent(final Container aContainer) { return order.get(0); @@ -899,7 +945,7 @@ public Component getDefaultComponent(final Container aContainer) { } /** - * DOCUMENT ME! + * Code Focus Listener * * @version $Revision$, $Date$ */ @@ -912,6 +958,12 @@ private final class CodeFocusListener implements FocusListener { //~ Methods ------------------------------------------------------------ + /** + * Sets the Focus on txaCode from selStart to selEnd + * If the Selected Area is Empty, Selects all. + * + * @param e Event + */ @Override public void focusGained(final FocusEvent e) { if (selStart < selEnd) { @@ -923,6 +975,11 @@ public void focusGained(final FocusEvent e) { } } + /** + * Gets the Focus on txaCode and saves the Start to selStart and the End to selEnd + * + * @param e Event + */ @Override public void focusLost(final FocusEvent e) { // preserve selection diff --git a/src/main/java/de/cismet/tools/PasswordEncrypterException.java b/src/main/java/de/cismet/tools/PasswordEncrypterException.java index 0a3652d..bb9506e 100644 --- a/src/main/java/de/cismet/tools/PasswordEncrypterException.java +++ b/src/main/java/de/cismet/tools/PasswordEncrypterException.java @@ -8,7 +8,7 @@ package de.cismet.tools; /** - * DOCUMENT ME! + * Password Encrypter Exception * * @author martin.scholl@cismet.de * @version $Revision$, $Date$ diff --git a/src/main/java/de/cismet/tools/PropertyEqualsProvider.java b/src/main/java/de/cismet/tools/PropertyEqualsProvider.java index f6beb13..24f223a 100644 --- a/src/main/java/de/cismet/tools/PropertyEqualsProvider.java +++ b/src/main/java/de/cismet/tools/PropertyEqualsProvider.java @@ -24,7 +24,7 @@ package de.cismet.tools; /** - * DOCUMENT ME! + * Property Equals Provideer * * @author thorsten * @version $Revision$, $Date$ diff --git a/src/main/java/de/cismet/tools/PropertyReader.java b/src/main/java/de/cismet/tools/PropertyReader.java index ee73dd5..ee26466 100644 --- a/src/main/java/de/cismet/tools/PropertyReader.java +++ b/src/main/java/de/cismet/tools/PropertyReader.java @@ -18,7 +18,7 @@ import java.util.Properties; /** - * DOCUMENT ME! + * Property Reader * * @author srichter * @version $Revision$, $Date$ @@ -69,7 +69,7 @@ public PropertyReader(final String filename) { //~ Methods ---------------------------------------------------------------- /** - * get the Property. + * Gets the Property. * * @param key key * @@ -80,7 +80,7 @@ public final String getProperty(final String key) { } /** - * get the Filename. + * Gets the Filename. * * @return filename */ @@ -89,7 +89,7 @@ public String getFilename() { } /** - * get the Internal Propeties. + * Gets the Internal Propeties. * * @return properties */ diff --git a/src/main/java/de/cismet/tools/ScriptRunner.java b/src/main/java/de/cismet/tools/ScriptRunner.java index 75f570c..9c328b7 100644 --- a/src/main/java/de/cismet/tools/ScriptRunner.java +++ b/src/main/java/de/cismet/tools/ScriptRunner.java @@ -68,9 +68,9 @@ public class ScriptRunner { /** * Default constructor. * - * @param connection DOCUMENT ME! - * @param autoCommit DOCUMENT ME! - * @param stopOnError DOCUMENT ME! + * @param connection Connection + * @param autoCommit Enables/Disables autoCommit + * @param stopOnError Enables/Disables stopOnError */ public ScriptRunner(final Connection connection, final boolean autoCommit, final boolean stopOnError) { this.connection = connection; @@ -81,27 +81,27 @@ public ScriptRunner(final Connection connection, final boolean autoCommit, final //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Setter for delimiter property * - * @param delimiter DOCUMENT ME! + * @param delimiter new vslue of the delimiter property */ public void setDelimiter(final String delimiter) { this.delimiter = delimiter; } /** - * Setter for logWriter property. + * Setter for logWriter property. * - * @param logWriter - the new value of the logWriter property + * @param logWriter - the new value of the logWriter property */ public void setLogWriter(final PrintWriter logWriter) { this.logWriter = logWriter; } /** - * Setter for errorLogWriter property. + * Setter for errorLogWriter property. * - * @param errorLogWriter - the new value of the errorLogWriter property + * @param errorLogWriter - the new value of the errorLogWriter property */ public void setErrorLogWriter(final PrintWriter errorLogWriter) { this.errorLogWriter = errorLogWriter; @@ -112,9 +112,9 @@ public void setErrorLogWriter(final PrintWriter errorLogWriter) { * * @param reader - the source of the script * - * @throws IOException DOCUMENT ME! - * @throws SQLException DOCUMENT ME! - * @throws RuntimeException DOCUMENT ME! + * @throws IOException if there is an error reading from the Reader + * @throws SQLException if any SQL errors occur + * @throws RuntimeException "Error running script. Cause: " */ public void runScript(final Reader reader) throws IOException, SQLException { try { @@ -289,11 +289,11 @@ private void runScript(final Connection conn, final Reader reader) throws IOExce } /** - * DOCUMENT ME! + * Counts the "'" in the specified String and tests whether the number is even or not. * - * @param s DOCUMENT ME! + * @param s String which should be tested * - * @return DOCUMENT ME! + * @return True, if the Number is even. */ private boolean evenQuotes(final String s) { int count = 0; @@ -307,20 +307,20 @@ private boolean evenQuotes(final String s) { } /** - * DOCUMENT ME! + * Gettter for delimiter * - * @return DOCUMENT ME! + * @return delimiter */ private String getDelimiter() { return delimiter; } /** - * DOCUMENT ME! + * If logWriter is Empty print the Object in System Console * *

    >>>>>>> .r4704

    * - * @param o DOCUMENT ME! + * @param o Object which is going to be printed */ private void print(final Object o) { if (logWriter != null) { @@ -329,9 +329,9 @@ private void print(final Object o) { } /** - * DOCUMENT ME! + * If logWriter is Empty print the Object in logWriter.Does a Line Break and flushes. * - * @param o DOCUMENT ME! + * @param o Object which is going to be printed */ private void println(final Object o) { if (logWriter != null) { @@ -341,9 +341,9 @@ private void println(final Object o) { } /** - * DOCUMENT ME! + * If errorLogWriter is Empty print the Object in errorLogWriter.Does a Line Break and flushes. * - * @param o DOCUMENT ME! + * @param o Object which is going to be printed */ private void printlnError(final Object o) { if (errorLogWriter != null) { @@ -353,7 +353,7 @@ private void printlnError(final Object o) { } /** - * DOCUMENT ME! + * Flushes the Streams */ private void flush() { if (logWriter != null) { diff --git a/src/main/java/de/cismet/tools/Sorter.java b/src/main/java/de/cismet/tools/Sorter.java index dcb8e8c..c12053e 100644 --- a/src/main/java/de/cismet/tools/Sorter.java +++ b/src/main/java/de/cismet/tools/Sorter.java @@ -7,7 +7,7 @@ ****************************************************/ package de.cismet.tools; /** - * DOCUMENT ME! + * Sorter Tool * * @version $Revision$, $Date$ */ @@ -17,11 +17,11 @@ public class Sorter { // ----------------------------------------------------------------------------------------------- /** - * ueberpruft ob das array sortiert ist. + * Tests whether the specified Array is sorted or not. * - * @param array DOCUMENT ME! + * @param array Array, which is going to be tested. * - * @return DOCUMENT ME! + * @return True, if the Array is sorted. */ private static boolean isSorted(final Comparable[] array) { if (array.length < 2) { @@ -40,16 +40,24 @@ private static boolean isSorted(final Comparable[] array) { } /** - * ------------------------------------------------------------------------------- + * Sorts the specified Array with insertionSort. The Complete Array is searched. * - * @param array DOCUMENT ME! + * @param array Array, which is going to get sorted + * + * @see #insertionSort(java.lang.Comparable[], int, int) */ public static void insertionSort(final Comparable[] array) { insertionSort(array, 0, array.length - 1); } - /**InsertionSort*/ - + /** + * Sorts the specified Array with insertionSort. Sorts only a specified area. + * + * @param array Array, which is going to get sorted + * @param left left end of the area, which is going to get sorted + * @param right right end of the area, which is going to get sorted + * + */ public static void insertionSort(final Comparable[] array, final int left, final int right) { int in; int out; @@ -71,12 +79,17 @@ public static void insertionSort(final Comparable[] array, final int left, final //---------------------------------------------------------------------------------------------------------- /** - * Quicksort welches bei der Unterschreitung von partitionsize auf InsertionSort umschaltet. + * Sorts the specified Array with Quicksort.Sorts only a specified area. + * If the to be sorted area is smaller than or equal partitionSize, InsertionSort will be used. * - * @param array DOCUMENT ME! - * @param left DOCUMENT ME! - * @param right DOCUMENT ME! - * @param partitionSize DOCUMENT ME! + * @param array Array, which is going to get sorted. + * @param left left end of the area, which is going to get sorted + * @param right right end of the area, which is going to get sorted + * @param partitionSize minimal size for using Quicksort + * + * @see #insertionSort(java.lang.Comparable[], int, int) + * @see #partitionIt(java.lang.Comparable[], int, int, java.lang.Object) + * @see #swap(java.lang.Object[], int, int) */ private static void quickSort(final Comparable[] array, final int left, final int right, final int partitionSize) { @@ -98,23 +111,32 @@ private static void quickSort(final Comparable[] array, final int left, final in } /** - * ---------------------------------------------------------------------------------------------- + * Sorts the specified Array with Quicksort.Sorts the complete Array. + * If the to be sorted area is smaller than or equal 16, InsertionSort will be used. * - * @param array DOCUMENT ME! + * @param array Array, which is going to get sorted. + * + * @see #quickSort(java.lang.Comparable[], int, int, int) */ public static void quickSort(final Comparable[] array) { quickSort(array, 0, array.length - 1, 16); // no insertion when partition >=16 } /** - * --------------------------------------------------------------------------- nimmt die unterteilung in die Mengen - * S< u. S> vor wird von Quicksort verwendet* + * Divides into two Sets + *
      + *
    1. all Elements which are smaller than the Rightmost
    2. + *
    3. all Elements which are bigger than the Rightmost
    4. + *
    * - * @param array DOCUMENT ME! - * @param left DOCUMENT ME! - * @param right DOCUMENT ME! - * @param pivot DOCUMENT ME! + * @param array Array, which is going to get Sorted + * @param left left end of the area, which is going to get sorted + * @param right right end of the area, which is going to get sorted + * @param pivot Rightmost * - * @return DOCUMENT ME! + * @return Location of the Rightmost after the Sorting + * + * @see #quickSort(java.lang.Comparable[], int, int, int) + * @see #swap(java.lang.Object[], int, int) */ private static int partitionIt(final Comparable[] array, final int left, final int right, final Object pivot) { int leftPtr = left - 1; @@ -144,11 +166,14 @@ private static int partitionIt(final Comparable[] array, final int left, final i //---------------------------------------------------------------------------------------------- /** - * tauscht 2 Elemente eines Arrays. + * swaps two Elements of the specified Array * - * @param array DOCUMENT ME! - * @param i DOCUMENT ME! - * @param j DOCUMENT ME! + * @param array Array, which is going to get sorted + * @param i Location of Element one + * @param j Location of Element two + * + * @see #quickSort(java.lang.Comparable[], int, int, int) + * @see #partitionIt(java.lang.Comparable[], int, int, java.lang.Object) */ private static void swap(final Object[] array, final int i, final int j) { diff --git a/src/main/java/de/cismet/tools/StaticDebuggingTools.java b/src/main/java/de/cismet/tools/StaticDebuggingTools.java index 1cdd589..8160b2f 100644 --- a/src/main/java/de/cismet/tools/StaticDebuggingTools.java +++ b/src/main/java/de/cismet/tools/StaticDebuggingTools.java @@ -18,7 +18,7 @@ import java.io.File; /** - * DOCUMENT ME! + * StaticDebuggingTools * * @author cschmidt * @version $Revision$, $Date$ @@ -36,11 +36,11 @@ public StaticDebuggingTools() { //~ Methods ---------------------------------------------------------------- /** - * �berpr�ft ob eine Datei mit dem �bergebenen Dateiname im Home-Verzeichnis des Users existiert. + * Tests whether the specified Filename exists in the User's Home Directory or not. * - * @param filename Name der gesuchten Datei. + * @param filename Filename of the searched File * - * @return DOCUMENT ME! + * @return True, if the Filename is contained in the Home Directory */ public static boolean checkHomeForFile(final String filename) { try { diff --git a/src/main/java/de/cismet/tools/StaticDecimalTools.java b/src/main/java/de/cismet/tools/StaticDecimalTools.java index 8d1b379..6da4fb5 100644 --- a/src/main/java/de/cismet/tools/StaticDecimalTools.java +++ b/src/main/java/de/cismet/tools/StaticDecimalTools.java @@ -8,7 +8,7 @@ package de.cismet.tools; /** - * DOCUMENT ME! + * StaticDecimalTools. Rounds Double. * * @author thorsten.hell@cismet.de * @version $Revision$, $Date$ @@ -18,22 +18,24 @@ public class StaticDecimalTools { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Rounds Doubles to the Form "0.00" * - * @param d DOCUMENT ME! + * @param d Double which should be rounded * - * @return DOCUMENT ME! + * @return the rounded Double + * + * @see #round(java.lang.String, double) */ public static String round(final double d) { return round("0.00", d); // NOI18N } /** - * DOCUMENT ME! + * Rounds the Doubles to a specified Form. * - * @param pattern DOCUMENT ME! - * @param d DOCUMENT ME! + * @param pattern Form of the rounded Double as String + * @param d Double which should be rounded * - * @return DOCUMENT ME! + * @return the rounded Double */ public static String round(final String pattern, final double d) { final double dd = ((double)(Math.round(d * 100))) / 100; diff --git a/src/main/java/de/cismet/tools/StaticHtmlTools.java b/src/main/java/de/cismet/tools/StaticHtmlTools.java index 21292ec..390f31d 100644 --- a/src/main/java/de/cismet/tools/StaticHtmlTools.java +++ b/src/main/java/de/cismet/tools/StaticHtmlTools.java @@ -12,7 +12,7 @@ import java.net.URLEncoder; /** - * DOCUMENT ME! + * StaticHtmlTools * * @author thorsten.hell@cismet.de * @version $Revision$, $Date$ @@ -22,11 +22,11 @@ public class StaticHtmlTools { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * converts HTTPReferences. * - * @param newString DOCUMENT ME! + * @param newString link * - * @return DOCUMENT ME! + * @return HTTPReference */ public static String convertHTTPReferences(String newString) { int hrefStartPos; @@ -95,11 +95,11 @@ public static String convertHTTPReferences(String newString) { } /** - * DOCUMENT ME! + * Strips Meta Tag. * - * @param text DOCUMENT ME! + * @param text String * - * @return DOCUMENT ME! + * @return Meta Tag */ public static String stripMetaTag(final String text) { // String used for searching, comparison and indexing @@ -122,9 +122,9 @@ public static String stripMetaTag(final String text) { } /** - * DOCUMENT ME! + * main * - * @param args DOCUMENT ME! + * @param args args */ public static void main(final String[] args) { final String test = "test http://www.google.de?quiery wer"; // NOI18N @@ -133,11 +133,11 @@ public static void main(final String[] args) { } /** - * DOCUMENT ME! + * Converts the specified String into a HTMLString. * - * @param string DOCUMENT ME! + * @param string String, which is going to get converted * - * @return DOCUMENT ME! + * @return HTMLString */ public static String stringToHTMLString(final String string) { if (string == null) { @@ -197,11 +197,11 @@ public static String stringToHTMLString(final String string) { } /** - * DOCUMENT ME! + * Encodes the specified String into UTF-8 Format. * - * @param parameter DOCUMENT ME! + * @param parameter String, which is going to be encoded * - * @return DOCUMENT ME! + * @return encoded String */ public static String encodeURLParameter(final String parameter) { try { diff --git a/src/main/java/de/cismet/tools/StaticXMLTools.java b/src/main/java/de/cismet/tools/StaticXMLTools.java index d501709..688dab2 100644 --- a/src/main/java/de/cismet/tools/StaticXMLTools.java +++ b/src/main/java/de/cismet/tools/StaticXMLTools.java @@ -17,7 +17,7 @@ import java.awt.Font; /** - * DOCUMENT ME! + * Static XML Tools * * @author thorsten * @version $Revision$, $Date$ @@ -39,9 +39,9 @@ private StaticXMLTools() { //~ Methods ---------------------------------------------------------------- /** - * Konvertiert eine Farbe zu folgendem XML-Code . + * Converts a Color into XML-Code . * - * @param c die in XML darzustellende Farbe + * @param c Color, which is going to be converted * * @return JDOM-Element */ @@ -55,11 +55,11 @@ public static Element convertColorToXML(final Color c) { } /** - * DOCUMENT ME! + * Converts the specified XMLElement into a Color * - * @param xmlElement DOCUMENT ME! + * @param xmlElement xmlElemt, which is going to be converted * - * @return DOCUMENT ME! + * @return Color */ public static Color convertXMLElementToColor(final Element xmlElement) { int red = 0; @@ -89,9 +89,9 @@ public static Color convertXMLElementToColor(final Element xmlElement) { } /** - * Konvertiert eine Schrift zu folgendem XML-Code. + * Converts the Font into XML-Code * - * @param f die zu konvertierende Schrift + * @param f Font, which is going to be converted * * @return JDOM-Element */ @@ -104,11 +104,11 @@ public static Element convertFontToXML(final Font f) { } /** - * DOCUMENT ME! + * Converts XMLElement into Font * - * @param xmlElement DOCUMENT ME! + * @param xmlElement xmlElement, which is going to be converted * - * @return DOCUMENT ME! + * @return Font */ public static Font convertXMLElementToFont(final Element xmlElement) { String name = "sansserif"; // NOI18N @@ -132,9 +132,9 @@ public static Font convertXMLElementToFont(final Element xmlElement) { } /** - * DOCUMENT ME! + * Posts the specified XML on the Logger. * - * @param element DOCUMENT ME! + * @param element XML, which is going to be posted */ public static void logXML(final Element element) { final Document doc = new Document(); diff --git a/src/main/java/de/cismet/tools/StringTools.java b/src/main/java/de/cismet/tools/StringTools.java index d83f802..605eeb9 100644 --- a/src/main/java/de/cismet/tools/StringTools.java +++ b/src/main/java/de/cismet/tools/StringTools.java @@ -13,7 +13,7 @@ package de.cismet.tools; /** - * DOCUMENT ME! + * String Tools * * @author schlob * @version $Revision$, $Date$ @@ -31,11 +31,11 @@ private StringTools() { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Deletes Whitspaces in the String * - * @param string DOCUMENT ME! + * @param string String, which is going to get cleaned * - * @return DOCUMENT ME! + * @return cleaned String */ public static String deleteWhitespaces(final String string) { if (string == null) { From d253a44dee2f520069eaf97f542fe2a7474ce24b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCsel?= Date: Mon, 7 Jan 2013 18:03:50 +0100 Subject: [PATCH 10/34] #9 Java Doc Improvements of Package de.cismet.tools --- src/main/java/de/cismet/tools/Base64.java | 2 +- .../java/de/cismet/tools/BrowserLauncher.java | 13 +++++-- .../de/cismet/tools/CalculationCache.java | 16 ++++---- .../java/de/cismet/tools/ConnectionInfo.java | 2 +- src/main/java/de/cismet/tools/Equals.java | 3 +- src/main/java/de/cismet/tools/FileUtils.java | 38 +++++++++---------- .../cismet/tools/PropertyEqualsProvider.java | 2 +- .../java/de/cismet/tools/TextFromFile.java | 8 ++-- .../java/de/cismet/tools/TimeoutThread.java | 6 +-- .../java/de/cismet/tools/URLSplitter.java | 34 +++++++++++------ 10 files changed, 70 insertions(+), 54 deletions(-) diff --git a/src/main/java/de/cismet/tools/Base64.java b/src/main/java/de/cismet/tools/Base64.java index a74dae2..6ec825e 100644 --- a/src/main/java/de/cismet/tools/Base64.java +++ b/src/main/java/de/cismet/tools/Base64.java @@ -57,7 +57,7 @@ private Base64() { * * @return the base64 encoded input array * - * @throws IllegalArgumentException DOCUMENT ME! + * @throws IllegalArgumentException if the given array is of length null */ public static byte[] toBase64(final byte[] byteString, final boolean wipeInput) { if (byteString == null) { diff --git a/src/main/java/de/cismet/tools/BrowserLauncher.java b/src/main/java/de/cismet/tools/BrowserLauncher.java index 6c28b71..bc4bb8d 100644 --- a/src/main/java/de/cismet/tools/BrowserLauncher.java +++ b/src/main/java/de/cismet/tools/BrowserLauncher.java @@ -460,7 +460,8 @@ private static Object locateBrowser() { } /** - * DOCUMENT ME! + * Attempts to open the default web browser to the gieven URL. + * In the second attempt he tries to open the url as a file. * * @param url DOCUMENT ME! */ @@ -488,8 +489,14 @@ public static void openURLorFile(final String url) { * * @param url The URL to open * - * @throws Exception DOCUMENT ME! - * @throws IOException If the web browser could not be located or does not run + * @throws Exception + * @throws IOException + *
      + *
    • If the web browser could not be located or does not run
    • + *
    • If it catches a InvocationTargetException
    • + *
    • If it catches a IllegalAccessExeption
    • + *
    • if it catches a InstantiationException
    • + * */ public static void openURL(final String url) throws Exception { if (log.isDebugEnabled()) { diff --git a/src/main/java/de/cismet/tools/CalculationCache.java b/src/main/java/de/cismet/tools/CalculationCache.java index ac676ff..1d16ee6 100644 --- a/src/main/java/de/cismet/tools/CalculationCache.java +++ b/src/main/java/de/cismet/tools/CalculationCache.java @@ -49,11 +49,11 @@ public CalculationCache(final Calculator calc) { /** * Calculates the value for the given key, if required and caches it. * - * @param key link query DOCUMENT ME! + * @param key link query * - * @return DOCUMENT ME! + * @return value * - * @throws Exception DOCUMENT ME! + * @throws Exception if any Exception is in {@link #exceptionCache} */ public VALUE calcValue(final KEY key) throws Exception { VALUE result = cache.get(key); @@ -118,9 +118,9 @@ public void run() { } /** - * DOCUMENT ME! + * Get the time in milliseconds, the result should be cached * - * @return the time in milliseconds, the result should be cached + * @return the time in milliseconds */ public long getTimeToCacheResults() { return timeToCacheResults; @@ -136,10 +136,10 @@ public void setTimeToCacheResults(final long timeToCacheResults) { } /** - * DOCUMENT ME! - * - * @return the time in milliseconds, exceptions, which were thrown during the calculation of a value, should be + * get the time in milliseconds, exceptions, which were thrown during the calculation of a value, should be * cached + * + * @return the time in milliseconds */ public long getTimeToCacheExceptions() { return timeToCacheExceptions; diff --git a/src/main/java/de/cismet/tools/ConnectionInfo.java b/src/main/java/de/cismet/tools/ConnectionInfo.java index 734941e..39b5b38 100644 --- a/src/main/java/de/cismet/tools/ConnectionInfo.java +++ b/src/main/java/de/cismet/tools/ConnectionInfo.java @@ -90,7 +90,7 @@ public void setUrl(final String url) { /** * Getter for User. * - * @return DB USer + * @return DB User */ public String getUser() { return user; diff --git a/src/main/java/de/cismet/tools/Equals.java b/src/main/java/de/cismet/tools/Equals.java index 20468fd..dd55d6f 100644 --- a/src/main/java/de/cismet/tools/Equals.java +++ b/src/main/java/de/cismet/tools/Equals.java @@ -35,7 +35,7 @@ private Equals() { * @param o object one * @param o2 object two * - * @return true, if obeject one and object two deliver the same result for every bean getter + * @return true, if object one and object two deliver the same result for every bean getter * * @see #beanDeepEqual(java.lang.Object, java.lang.Object, java.lang.String[]) */ @@ -117,7 +117,6 @@ private static boolean contains(final String name, final String... array) { *
    • is not static
    • *
    • name starts with 'get' (or 'is' for boolean getters)
    • *
    • there exists a field with a corresponding name
    • - *
    • *
    * * @param m given method diff --git a/src/main/java/de/cismet/tools/FileUtils.java b/src/main/java/de/cismet/tools/FileUtils.java index 691c6b0..347062c 100644 --- a/src/main/java/de/cismet/tools/FileUtils.java +++ b/src/main/java/de/cismet/tools/FileUtils.java @@ -53,7 +53,7 @@ private FileUtils() { //~ Methods ---------------------------------------------------------------- /** - * Checks whether the File is a MetaFiles or not + * Tests whether the specified File is a MetaFiles or not * * @param check File to be tested * @@ -66,7 +66,7 @@ public static boolean isMetaFile(final File check) { } /** - * Checks whether the File is a MetaFile of the tested OS or not + * Tests whether the specified File is a MetaFile of the tested OS or not * * @param check File to be tested * @param mode Number of OS to be tested @@ -78,7 +78,7 @@ public static boolean isMetaFile(final File check, final int mode) { } /** - * get the MetaEntries for the Meta + * Getter for MetaEntries of the specified Meta * * @param mode Metanumber * @@ -118,7 +118,7 @@ private static String[] getMetaEntries(final int mode) { } /** - * Checks whether the File has the Metaentries or not + * Tests whether the specified File has the specified Metaentries or not * * @param filename name of the tested File * @param meta Metaentries to be tested @@ -153,7 +153,7 @@ private static int getMode() { } /** - * Getter for the name of the File + * Getter for the name of the specified File * * @param file given File * @@ -170,7 +170,7 @@ public static String getName(final File file) { } /** - * Getter for the Filestype + * Getter for the Filestype of the specified File * * @param file given file * @@ -187,7 +187,7 @@ public static String getExt(final File file) { } /** - * Tests whether the File only contains MetaFiles or not + * Tests whether the specified File only contains MetaFiles of one type or not * * @param check File to be tested * @@ -200,9 +200,9 @@ public static boolean containsOnlyMetaFiles(final File check) { } /** - * Tests whether the Directory only contains MetaFiles of the given OS + * Tests whether the specified Directory only contains MetaFiles of the specified OS * - * @param check File to be tested + * @param check Directory/code> to be tested * @param mode Os * * @return true, if it only contains MetaFiles of the tested Os @@ -225,7 +225,7 @@ public static boolean containsOnlyMetaFiles(final File check, final int mode) { return true; } /** - * Copies the File + * Copies the specified File * Note: exception thrown and not handled to avoid logger call if it is necessary to use logger in this class return * boolean and handle exceptions. * @@ -258,7 +258,7 @@ public static void copyFile(final File inFile, final File outFile) throws FileNo } /** - * Copys the Directory. It uses the a filtered list of Files contained inside the Directory. If there is any Directory the Method starts recursive + * Copies the Content of the specified Directory. It uses {@link FilesFilter}. If it is a File, it copies the File and if it is a Directory, the methode start recursive again with the found DirectoryDirectory. * - * @param srcDir given Directory + * @param srcDir Directory * @param recursive recursive * * @throws IOException IOException @@ -442,7 +442,7 @@ public static void extractJar(final File jar, final File dest, final FileFilter //~ Inner Classes ---------------------------------------------------------- /** - * Inner Class JarFilter + * Filter for searching for .jar Files * * @version $Revision$, $Date$ */ @@ -464,7 +464,7 @@ public boolean accept(final File file) { } /** - * Inner Class DirandJarFilter + * Filter for searching for .jar Files and Directories * * @version $Revision$, $Date$ */ @@ -486,7 +486,7 @@ public boolean accept(final File file) { } /** - * Inner Class DirectoryFilter + * Filter for searching for Directories * * @version $Revision$, $Date$ */ @@ -509,7 +509,7 @@ public boolean accept(final File file) { } /** - * Inner Class FilesFilter + * Filter for searching for Files * * @version $Revision$, $Date$ */ @@ -522,7 +522,7 @@ public static final class FilesFilter implements FileFilter { * * @param file given File * - * @return true, if the File is a Directory + * @return true, if the File is Not! a Directory, false if it is a Directory */ @Override @@ -532,7 +532,7 @@ public boolean accept(final File file) { } /** - * Inner Class MetaInfFilter + * Filter for searching for MetaFiles * * @version $Revision$, $Date$ */ diff --git a/src/main/java/de/cismet/tools/PropertyEqualsProvider.java b/src/main/java/de/cismet/tools/PropertyEqualsProvider.java index 24f223a..5a7271a 100644 --- a/src/main/java/de/cismet/tools/PropertyEqualsProvider.java +++ b/src/main/java/de/cismet/tools/PropertyEqualsProvider.java @@ -24,7 +24,7 @@ package de.cismet.tools; /** - * Property Equals Provideer + * Property Equals Provider * * @author thorsten * @version $Revision$, $Date$ diff --git a/src/main/java/de/cismet/tools/TextFromFile.java b/src/main/java/de/cismet/tools/TextFromFile.java index 0c5e344..5b70dd2 100644 --- a/src/main/java/de/cismet/tools/TextFromFile.java +++ b/src/main/java/de/cismet/tools/TextFromFile.java @@ -11,7 +11,7 @@ import java.util.*; /** - * DOCUMENT ME! + * Class for getting Text from File * * @version $Revision$, $Date$ */ @@ -26,16 +26,16 @@ public class TextFromFile { //~ Constructors ----------------------------------------------------------- /** - * ///////////////////////////////////////// + * Creates a Default TextFromFile object. */ public TextFromFile() { data = new byte[0]; } /** - * /////////////////////////////////////////// + * Creates a new TextFromFile object from file with specified filepath * - * @param filepath DOCUMENT ME! + * @param filepath filepath */ public TextFromFile(final String filepath) { try { diff --git a/src/main/java/de/cismet/tools/TimeoutThread.java b/src/main/java/de/cismet/tools/TimeoutThread.java index f65b399..5098171 100644 --- a/src/main/java/de/cismet/tools/TimeoutThread.java +++ b/src/main/java/de/cismet/tools/TimeoutThread.java @@ -45,10 +45,10 @@ public TimeoutThread() { * * @param timeInMillis the time to wait in milliseconds * - * @return DOCUMENT ME + * @return result * - * @throws Exception DOCUMENT ME! - * @throws TimeoutException DOCUMENT ME! + * @throws Exception + * @throws TimeoutException */ public T start(final long timeInMillis) throws Exception { final Thread t = new Thread(this); diff --git a/src/main/java/de/cismet/tools/URLSplitter.java b/src/main/java/de/cismet/tools/URLSplitter.java index 4fa5be6..7a093c3 100644 --- a/src/main/java/de/cismet/tools/URLSplitter.java +++ b/src/main/java/de/cismet/tools/URLSplitter.java @@ -8,7 +8,7 @@ package de.cismet.tools; /** - * DOCUMENT ME! + * Urlsplitter * * @author thorsten.hell@cismet.de * @version $Revision$, $Date$ @@ -27,7 +27,7 @@ public class URLSplitter { /** * Creates a new URLSplitter object. * - * @param url DOCUMENT ME! + * @param url given url */ public URLSplitter(final String url) { // Versuch den Protokoll Prefix zu f\u00FCllen @@ -85,41 +85,51 @@ private URLSplitter() { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Getter for prot_prefix * - * @return DOCUMENT ME! + * @return prot_prefix */ public String getProt_prefix() { return prot_prefix; } /** - * DOCUMENT ME! + * Getter for server * - * @return DOCUMENT ME! + * @return server */ public String getServer() { return server; } /** - * DOCUMENT ME! + * Getter for path * - * @return DOCUMENT ME! + * @return path */ public String getPath() { return path; } /** - * DOCUMENT ME! + * Getter for object_name * - * @return DOCUMENT ME! + * @return object_name */ public String getObject_name() { return object_name; } + /** + * returns a String, which has the following form
    + * Prot: {@link #prot_prefix}
    + * Server: {@link #server}
    + * Path: {@link #path}
    + * Objekt: {@link #object_name}
    + * + * @return String + */ + @Override public String toString() { return "Prot: " + prot_prefix + "\n" // NOI18N @@ -129,9 +139,9 @@ public String toString() { } /** - * DOCUMENT ME! + * main * - * @param args DOCUMENT ME! + * @param args args */ public static void main(final String[] args) { System.out.println("\n" + new URLSplitter("http://www.google.de/")); // NOI18N From b065b91fcb64138b5f9123637ee8c8ddc2763be5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCsel?= Date: Tue, 8 Jan 2013 11:30:10 +0100 Subject: [PATCH 11/34] #9 Java Doc Improvements of package Sirius.util.collections --- .../util/collections/IntMapsString.java | 24 ++++++++----- .../Sirius/util/collections/MultiMap.java | 34 +++++++++---------- .../util/collections/StringMapsInt.java | 26 +++++++++----- .../util/collections/StringMapsString.java | 24 +++++++++---- .../util/collections/SyncLinkedList.java | 2 +- 5 files changed, 68 insertions(+), 42 deletions(-) diff --git a/src/main/java/Sirius/util/collections/IntMapsString.java b/src/main/java/Sirius/util/collections/IntMapsString.java index d8aee54..8fc719b 100644 --- a/src/main/java/Sirius/util/collections/IntMapsString.java +++ b/src/main/java/Sirius/util/collections/IntMapsString.java @@ -7,8 +7,14 @@ ****************************************************/ package Sirius.util.collections; +import java.util.Hashtable; + /** - * DOCUMENT ME! + * Modified {@link Hashtable}, which maps Integer to String. + *
      + *
    • Key - Integer
    • + *
    • Value - String
    • + *
    * * @version $Revision$, $Date$ */ @@ -28,6 +34,8 @@ public class IntMapsString extends java.util.Hashtable { * * @param initialCapacity Capacity when Object is created * @param loadFactor buffer for capacity increase + * + * @see Hashtable */ IntMapsString(final int initialCapacity, final float loadFactor) { super(initialCapacity, loadFactor); @@ -36,19 +44,19 @@ public class IntMapsString extends java.util.Hashtable { //~ Methods ---------------------------------------------------------------- /** - * Associates a String astring(value) to a Integery id(key). + * Associates a Integer id(key) to a String astring(value). * * @param id key * @param aString value - * - * @see #put(java.lang.Object, java.lang.Object) + * + * @see #put(java.lang.Object, java.lang.Object) */ public void add(final int id, final String aString) { super.put(new Integer(id), aString); } // end add /** - * Getter for the Value as a String + * Getter for the Value as a String. * * @param id key * @@ -75,13 +83,13 @@ public String getStringValue(final int id) throws Exception { // when exception concept is accomplished } /** - * Tests if the specified object is a key in IntMapsString + * Tests whether the specified object is a key in IntMapsString or not. * * @param key possible key * * @return true, if the object is a key in IntMapsString - * - * @see #containsKey(java.lang.Object) + * + * @see #containsKey(java.lang.Object) */ public boolean containsIntKey(final int key) { return super.containsKey(new Integer(key)); diff --git a/src/main/java/Sirius/util/collections/MultiMap.java b/src/main/java/Sirius/util/collections/MultiMap.java index 98367dc..c91db5c 100644 --- a/src/main/java/Sirius/util/collections/MultiMap.java +++ b/src/main/java/Sirius/util/collections/MultiMap.java @@ -9,6 +9,8 @@ import java.util.*; /** + * Modified {@link HashMap}, which makes it possible to map Keys to multiple Values. + * * //key=idnetifier;value=LinkedList. * * @version $Revision$, $Date$ @@ -24,7 +26,7 @@ public MultiMap() { this(10); } /** - * Creates new Multimap Object with chosen size. + * Creates new Multimap Object with specified size. * * @param size size */ @@ -35,17 +37,17 @@ public MultiMap(final int size) { //~ Methods ---------------------------------------------------------------- ///////////////////////////////////////////////// - + /** - * Assosiates value with key in this map. - * Instead of replace the values for a key, are multiple values for one key possible. - * - * @param key key - * @param value value - * - * @return Null + * Assosiates value with key in this map. Instead of replace the previous value for a + * key,it is possible to have multiple values for one key possible. + * + * @param key key + * @param value value + * + * @return Null */ - + @Override public Object put(final Object key, final Object value) { SyncLinkedList list = null; @@ -70,12 +72,10 @@ public Object put(final Object key, final Object value) { ////////////////////////////////////////////////////////////// /** - * Appends the values of the specified map to this map. - * Instead of replace the values for a key, are multiple values for one key possible. - * - * - * - * @param t map + * Appends the values of the specified map to this map. Instead of replace the previous value for + * a key, it is possible multiple values for one key possible. + * + * @param t map */ @Override @@ -102,7 +102,7 @@ public void putAll(final Map t) { } /** - * removes specied value associeated with specified key + * Removes specified value associeated with specified key. * * @param key key whose mapping is to be removed * @param value mapping to be removed diff --git a/src/main/java/Sirius/util/collections/StringMapsInt.java b/src/main/java/Sirius/util/collections/StringMapsInt.java index 4f60b9e..ecf0996 100644 --- a/src/main/java/Sirius/util/collections/StringMapsInt.java +++ b/src/main/java/Sirius/util/collections/StringMapsInt.java @@ -7,8 +7,14 @@ ****************************************************/ package Sirius.util.collections; +import java.util.Hashtable; + /** - * DOCUMENT ME! + * Modified {@link Hashtable}, which maps String to Integer. + *
      + *
    • Key - String
    • + *
    • Value - Integer
    • + *
    * * @version $Revision$, $Date$ */ @@ -28,6 +34,8 @@ public StringMapsInt() { * * @param initialCapacity Capacity when Object is created * @param loadFactor buffer for capacity increase + * + * @see Hashtable */ public StringMapsInt(final int initialCapacity, final float loadFactor) { super(initialCapacity, loadFactor); @@ -40,21 +48,21 @@ public StringMapsInt(final int initialCapacity, final float loadFactor) { * * @param descriptor key * @param sqlID value - * - * @see #put(java.lang.Object, java.lang.Object) + * + * @see #put(java.lang.Object, java.lang.Object) */ public void add(final String descriptor, final int sqlID) { super.put(descriptor, new Integer(sqlID)); } // end add /** - * Getter for the Value as a Integer + * Getter for the Value as a Integer. * * @param descriptor descriptor * * @return IntValue * - * @throws Exception DOCUMENT ME! + * @throws Exception * @throws java.lang.NullPointerException "Entry is not a Integer" or "No entry" */ public int getIntValue(final String descriptor) throws Exception { @@ -73,13 +81,13 @@ public int getIntValue(final String descriptor) throws Exception { // accomplished } /** - * Tests if the specified object is a key in StringMapsInt + * Tests whether the specified object is a key in StringMapsInt or not. * - * @param key possible key + * @param key possible key * * @return true, if the object is a key in StringMapsInt - * - * @see #containsKey(java.lang.Object) + * + * @see #containsKey(java.lang.Object) */ public boolean containsStringKey(final String key) { return super.containsKey(key); diff --git a/src/main/java/Sirius/util/collections/StringMapsString.java b/src/main/java/Sirius/util/collections/StringMapsString.java index cef61cb..a5ee94d 100644 --- a/src/main/java/Sirius/util/collections/StringMapsString.java +++ b/src/main/java/Sirius/util/collections/StringMapsString.java @@ -7,8 +7,14 @@ ****************************************************/ package Sirius.util.collections; +import java.util.Hashtable; + /** - * renames. + * Modified {@link Hashtable}, which maps String to String. + *
      + *
    • Key - String
    • + *
    • Value - String
    • + *
    * * @version $Revision$, $Date$ */ @@ -17,7 +23,7 @@ public class StringMapsString extends java.util.Hashtable { //~ Constructors ----------------------------------------------------------- /** - * Creates a new StringMapString object + * Creates a new StringMapString object. */ public StringMapsString() { super(); @@ -27,6 +33,8 @@ public StringMapsString() { * Creates a new StringMapsString object. * * @param initialCapacity Capacity when Object is created + * + * @see Hashtable */ public StringMapsString(final int initialCapacity) { super(initialCapacity); @@ -37,6 +45,8 @@ public StringMapsString(final int initialCapacity) { * * @param initialCapacity Capacity when Object is created * @param loadFactor buffer for capacity increase + * + * @see Hashtable */ public StringMapsString(final int initialCapacity, final float loadFactor) { super(initialCapacity, loadFactor); @@ -61,13 +71,13 @@ public void add(final String descriptor, final String aString) throws Exception } // end add /** - * Getter for the Value as a String + * Getter for the Value as a String. * * @param descriptor key * * @return StringValue * - * @throws Exception + * @throws Exception DOCUMENT ME! * @throws java.lang.NullPointerException "Entry is no String" or "No Entry" */ public String getStringValue(final String descriptor) throws Exception { @@ -84,13 +94,13 @@ public String getStringValue(final String descriptor) throws Exception { throw new java.lang.NullPointerException("No entry :" + descriptor); // NOI18N } /** - * Tests if the specified object is a key in StringMapsString + * Tests whether the specified object is a key in StringMapsString or not * * @param key possible key * * @return true, if the object is a key in StringMapsString - * - * @see #containsKey(java.lang.Object) + * + * @see #containsKey(java.lang.Object) */ public boolean containsStringKey(final String key) { return super.containsKey(key); diff --git a/src/main/java/Sirius/util/collections/SyncLinkedList.java b/src/main/java/Sirius/util/collections/SyncLinkedList.java index 4184d81..b20e6d1 100644 --- a/src/main/java/Sirius/util/collections/SyncLinkedList.java +++ b/src/main/java/Sirius/util/collections/SyncLinkedList.java @@ -14,7 +14,7 @@ import java.util.*; /** - * DOCUMENT ME! + * Modified {@link LinkedList} for synchronisation * * @author schlob * @version $Revision$, $Date$ From 05a9821c22fa90787a66fce613d07ddb5f04d7e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCsel?= Date: Tue, 8 Jan 2013 14:08:42 +0100 Subject: [PATCH 12/34] #9 Java Doc Improvements of package Sirius.util.collections --- .../Sirius/util/collections/IntMapsString.java | 9 +++++---- .../java/Sirius/util/collections/MultiMap.java | 12 ++++++------ .../Sirius/util/collections/StringMapsInt.java | 11 ++++++----- .../Sirius/util/collections/StringMapsString.java | 15 ++++++++------- .../Sirius/util/collections/SyncLinkedList.java | 2 +- 5 files changed, 26 insertions(+), 23 deletions(-) diff --git a/src/main/java/Sirius/util/collections/IntMapsString.java b/src/main/java/Sirius/util/collections/IntMapsString.java index 8fc719b..f20eda3 100644 --- a/src/main/java/Sirius/util/collections/IntMapsString.java +++ b/src/main/java/Sirius/util/collections/IntMapsString.java @@ -11,9 +11,10 @@ /** * Modified {@link Hashtable}, which maps Integer to String. + * *
      - *
    • Key - Integer
    • - *
    • Value - String
    • + *
    • Key - Integer
    • + *
    • Value - String
    • *
    * * @version $Revision$, $Date$ @@ -34,8 +35,8 @@ public class IntMapsString extends java.util.Hashtable { * * @param initialCapacity Capacity when Object is created * @param loadFactor buffer for capacity increase - * - * @see Hashtable + * + * @see Hashtable */ IntMapsString(final int initialCapacity, final float loadFactor) { super(initialCapacity, loadFactor); diff --git a/src/main/java/Sirius/util/collections/MultiMap.java b/src/main/java/Sirius/util/collections/MultiMap.java index c91db5c..0d84141 100644 --- a/src/main/java/Sirius/util/collections/MultiMap.java +++ b/src/main/java/Sirius/util/collections/MultiMap.java @@ -10,8 +10,8 @@ import java.util.*; /** * Modified {@link HashMap}, which makes it possible to map Keys to multiple Values. - * - * //key=idnetifier;value=LinkedList. + * + *

    //key=idnetifier;value=LinkedList.

    * * @version $Revision$, $Date$ */ @@ -39,8 +39,8 @@ public MultiMap(final int size) { ///////////////////////////////////////////////// /** - * Assosiates value with key in this map. Instead of replace the previous value for a - * key,it is possible to have multiple values for one key possible. + * Assosiates value with key in this map. Instead of replace the previous + * value for a key,it is possible to have multiple values for one key possible. * * @param key key * @param value value @@ -72,8 +72,8 @@ public Object put(final Object key, final Object value) { ////////////////////////////////////////////////////////////// /** - * Appends the values of the specified map to this map. Instead of replace the previous value for - * a key, it is possible multiple values for one key possible. + * Appends the values of the specified map to this map. Instead of replace the previous + * value for a key, it is possible multiple values for one key possible. * * @param t map */ diff --git a/src/main/java/Sirius/util/collections/StringMapsInt.java b/src/main/java/Sirius/util/collections/StringMapsInt.java index ecf0996..f0f3027 100644 --- a/src/main/java/Sirius/util/collections/StringMapsInt.java +++ b/src/main/java/Sirius/util/collections/StringMapsInt.java @@ -11,9 +11,10 @@ /** * Modified {@link Hashtable}, which maps String to Integer. + * *
      - *
    • Key - String
    • - *
    • Value - Integer
    • + *
    • Key - String
    • + *
    • Value - Integer
    • *
    * * @version $Revision$, $Date$ @@ -34,8 +35,8 @@ public StringMapsInt() { * * @param initialCapacity Capacity when Object is created * @param loadFactor buffer for capacity increase - * - * @see Hashtable + * + * @see Hashtable */ public StringMapsInt(final int initialCapacity, final float loadFactor) { super(initialCapacity, loadFactor); @@ -62,7 +63,7 @@ public void add(final String descriptor, final int sqlID) { * * @return IntValue * - * @throws Exception + * @throws Exception DOCUMENT ME! * @throws java.lang.NullPointerException "Entry is not a Integer" or "No entry" */ public int getIntValue(final String descriptor) throws Exception { diff --git a/src/main/java/Sirius/util/collections/StringMapsString.java b/src/main/java/Sirius/util/collections/StringMapsString.java index a5ee94d..a8b19b1 100644 --- a/src/main/java/Sirius/util/collections/StringMapsString.java +++ b/src/main/java/Sirius/util/collections/StringMapsString.java @@ -11,9 +11,10 @@ /** * Modified {@link Hashtable}, which maps String to String. + * *
      - *
    • Key - String
    • - *
    • Value - String
    • + *
    • Key - String
    • + *
    • Value - String
    • *
    * * @version $Revision$, $Date$ @@ -33,8 +34,8 @@ public StringMapsString() { * Creates a new StringMapsString object. * * @param initialCapacity Capacity when Object is created - * - * @see Hashtable + * + * @see Hashtable */ public StringMapsString(final int initialCapacity) { super(initialCapacity); @@ -45,8 +46,8 @@ public StringMapsString(final int initialCapacity) { * * @param initialCapacity Capacity when Object is created * @param loadFactor buffer for capacity increase - * - * @see Hashtable + * + * @see Hashtable */ public StringMapsString(final int initialCapacity, final float loadFactor) { super(initialCapacity, loadFactor); @@ -94,7 +95,7 @@ public String getStringValue(final String descriptor) throws Exception { throw new java.lang.NullPointerException("No entry :" + descriptor); // NOI18N } /** - * Tests whether the specified object is a key in StringMapsString or not + * Tests whether the specified object is a key in StringMapsString or not. * * @param key possible key * diff --git a/src/main/java/Sirius/util/collections/SyncLinkedList.java b/src/main/java/Sirius/util/collections/SyncLinkedList.java index b20e6d1..58f54b2 100644 --- a/src/main/java/Sirius/util/collections/SyncLinkedList.java +++ b/src/main/java/Sirius/util/collections/SyncLinkedList.java @@ -14,7 +14,7 @@ import java.util.*; /** - * Modified {@link LinkedList} for synchronisation + * Modified {@link LinkedList} for synchronisation. * * @author schlob * @version $Revision$, $Date$ From b2e13ddc40c66c8b4342d8f37eaebbfd8eb73542 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCsel?= Date: Tue, 8 Jan 2013 14:09:50 +0100 Subject: [PATCH 13/34] #9 Java Doc Improvements of PostGisGeometryFactory.java --- .../PostGisGeometryFactory.java | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/main/java/de/cismet/cismap/commons/jtsgeometryfactories/PostGisGeometryFactory.java b/src/main/java/de/cismet/cismap/commons/jtsgeometryfactories/PostGisGeometryFactory.java index 3bb29de..2a8c447 100644 --- a/src/main/java/de/cismet/cismap/commons/jtsgeometryfactories/PostGisGeometryFactory.java +++ b/src/main/java/de/cismet/cismap/commons/jtsgeometryfactories/PostGisGeometryFactory.java @@ -19,7 +19,7 @@ import java.util.Collection; /** - * DOCUMENT ME! + * PostGisGeometryFactory. * * @author hell * @version $Revision$, $Date$ @@ -37,7 +37,7 @@ public PostGisGeometryFactory() { //~ Methods ---------------------------------------------------------------- /** - * Getter for PostCompliantDBString + * Getter for PostCompliantDBString. * * @param g Geometry * @@ -52,7 +52,7 @@ public static String getPostGisCompliantDbString(final Geometry g) { } /** - * Creates new JtsPoint by using point + * Creates new JtsPoint by using point. * * @param point point * @param geometryFactory geometryFactory @@ -64,7 +64,7 @@ private static Point createJtsPoint(final org.postgis.Point point, final Geometr } /** - * Creates new JtsLineString by using lineString + * Creates new JtsLineString by using lineString. * * @param lineString lineString * @param geometryFactory geometryFactory @@ -81,7 +81,7 @@ private static LineString createJtsLineString(final org.postgis.LineString lineS } /** - * Creates new JtsLinearRing by using linearRing + * Creates new JtsLinearRing by using linearRing. * * @param linearRing linearRing * @param geometryFactory geometryFactory @@ -103,14 +103,14 @@ private static LinearRing createJtsLinearRing(final org.postgis.LinearRing linea } /** - * Creates new JtsPolygon by using polygon + * Creates new JtsPolygon by using polygon. * * @param polygon polygon * @param geometryFactory geometryFactory * * @return polygon - * - * @see #createJtsLinearRing(org.postgis.LinearRing, com.vividsolutions.jts.geom.GeometryFactory) + * + * @see #createJtsLinearRing(org.postgis.LinearRing, com.vividsolutions.jts.geom.GeometryFactory) */ private static Polygon createJtsPolygon(final org.postgis.Polygon polygon, final GeometryFactory geometryFactory) { final int ringcount = polygon.numRings(); @@ -130,14 +130,14 @@ private static Polygon createJtsPolygon(final org.postgis.Polygon polygon, final } /** - * Creates new JtsMultiPoint by using MultiPoint + * Creates new JtsMultiPoint by using MultiPoint. * * @param multiPoint MultiPoint * @param geometryFactory geometryFactory * * @return MultiPoint - * - * @see #createJtsPoint(org.postgis.Point, com.vividsolutions.jts.geom.GeometryFactory) + * + * @see #createJtsPoint(org.postgis.Point, com.vividsolutions.jts.geom.GeometryFactory) */ private static MultiPoint createJtsMultiPoint(final org.postgis.MultiPoint multiPoint, final GeometryFactory geometryFactory) { @@ -155,14 +155,14 @@ private static MultiPoint createJtsMultiPoint(final org.postgis.MultiPoint multi } /** - * Creates new JtsMultiLineString by using MultiLineString + * Creates new JtsMultiLineString by using MultiLineString. * * @param multiLineString MultiLineString * @param geometryFactory geometryFactory * * @return MultiLineString - * - * @see #createJtsLineString(org.postgis.LineString, com.vividsolutions.jts.geom.GeometryFactory) + * + * @see #createJtsLineString(org.postgis.LineString, com.vividsolutions.jts.geom.GeometryFactory) */ private static MultiLineString createJtsMultiLineString(final org.postgis.MultiLineString multiLineString, final GeometryFactory geometryFactory) { @@ -180,14 +180,14 @@ private static MultiLineString createJtsMultiLineString(final org.postgis.MultiL } /** - * Creates new JtsMultiPolygon by using MultiPolygon + * Creates new JtsMultiPolygon by using MultiPolygon. * * @param multiPolygon MultiPolygon! * @param geometryFactory geometryFactory * * @return MultiPolygon - * - * @see #createJtsPolygon(org.postgis.Polygon, com.vividsolutions.jts.geom.GeometryFactory) + * + * @see #createJtsPolygon(org.postgis.Polygon, com.vividsolutions.jts.geom.GeometryFactory) */ private static MultiPolygon createJtsMultiPolygon(final org.postgis.MultiPolygon multiPolygon, final GeometryFactory geometryFactory) { @@ -205,7 +205,7 @@ private static MultiPolygon createJtsMultiPolygon(final org.postgis.MultiPolygon } /** - * Creates new JtsGeometryCollection by using GeometryCollection + * Creates new JtsGeometryCollection by using GeometryCollection. * * @param geometryCollection GeometryCollection * @param geometryFactory geometryFactory @@ -264,7 +264,7 @@ private static GeometryCollection createJtsGeometryCollection( } /** - * Creates new JtsGeometry by using Geometry + * Creates new JtsGeometry by using Geometry. * * @param geom Geometry * From 11ee1c34784de50d829b41af644d31f766c6c305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCsel?= Date: Tue, 8 Jan 2013 14:10:46 +0100 Subject: [PATCH 14/34] #9 Java Doc Improvements of Proxy.java --- src/main/java/de/cismet/netutil/Proxy.java | 53 +++++++++++----------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/src/main/java/de/cismet/netutil/Proxy.java b/src/main/java/de/cismet/netutil/Proxy.java index 7447c18..30d96e7 100644 --- a/src/main/java/de/cismet/netutil/Proxy.java +++ b/src/main/java/de/cismet/netutil/Proxy.java @@ -110,7 +110,7 @@ public Proxy(final String host, //~ Methods ---------------------------------------------------------------- /** - * Getter for host + * Getter for host. * * @return host */ @@ -119,7 +119,7 @@ public String getHost() { } /** - * Setter for host + * Setter for host. * * @param host host */ @@ -128,7 +128,7 @@ public void setHost(final String host) { } /** - * Getter for port + * Getter for port. * * @return port */ @@ -137,7 +137,7 @@ public int getPort() { } /** - * Setter for port + * Setter for port. * * @param port port */ @@ -146,10 +146,11 @@ public void setPort(final int port) { } /** - * return as String - * - * @return "Proxy: " + host + ":" + port + " | username: " + username + - " | password: " + ((password == null) ? null : "") + " | domain: " + domain + * return as String. + * + * @return "Proxy: " + host + ":" + port + " | username: " + username +" | + * password: " + ((password == null) ? null : "") + " | + * domain: " + domain */ @Override public String toString() { @@ -158,7 +159,7 @@ public String toString() { } /** - * Getter for domain + * Getter for domain. * * @return domain */ @@ -167,7 +168,7 @@ public String getDomain() { } /** - * Setter for domain + * Setter for domain. * * @param domain domain */ @@ -176,7 +177,7 @@ public void setDomain(final String domain) { } /** - * Getter for password + * Getter for password. * * @return password */ @@ -185,7 +186,7 @@ public String getPassword() { } /** - * Setter for password + * Setter for password. * * @param password password */ @@ -194,7 +195,7 @@ public void setPassword(final String password) { } /** - * Getter for username + * Getter for username. * * @return username */ @@ -203,7 +204,7 @@ public String getUsername() { } /** - * Setter for username + * Setter for username. * * @param username username */ @@ -212,7 +213,7 @@ public void setUsername(final String username) { } /** - * Tests whether enabled is true or false + * Tests whether enabled is true or false. * * @return true, if it is enabled */ @@ -221,7 +222,7 @@ public boolean isEnabled() { } /** - * Enables or disables + * Enables or disables. * * @param enabled true or false */ @@ -230,16 +231,16 @@ public void setEnabled(final boolean enabled) { } /** - * Stores this proxy in the user's preferences. - * - * @see #toPreferences(de.cismet.netutil.Proxy) + * Stores this proxy in the user's preferences. + * + * @see #toPreferences(de.cismet.netutil.Proxy) */ public void toPreferences() { toPreferences(this); } /** - * Clears the Proxy Object + * Clears the Proxy Object. */ public static void clear() { final Preferences prefs = Preferences.userNodeForPackage(Proxy.class); @@ -315,8 +316,8 @@ public static void toPreferences(final Proxy proxy) { } /** - * Loads a Proxy instance from System preferences. If there are no host and port proxy - * information null will be returned. If the return value is non-null at least the host and the port is + * Loads a Proxy instance from System preferences. If there are no host and port proxy information + * null will be returned. If the return value is non-null at least the host and the port is * initialised. Username, Password and Domain may be null. * * @return the user's proxy settings or null if no settings present @@ -343,7 +344,7 @@ public static Proxy fromSystem() { } /** - * main + * main. * * @param args args */ @@ -384,8 +385,8 @@ public static void main(final String[] args) { } /** - * shows Message. - * If there is no System.console it writes the meassage on OptionPane.Else it writes the message on Console as Error or Output. + * shows Message. If there is no System.console it writes the meassage on OptionPane.Else it writes the message on + * Console as Error or Output. * * @param message the message * @param error true if it is a error message,false if not @@ -407,7 +408,7 @@ private static void showMessage(final String message, final boolean error) { } /** - * print usage + * print usage. */ private static void printUsage() { showMessage("Supported parameters are:\n\n" // NOI18N From a6378228535358d3ff4599b86eae12e290b4a10e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCsel?= Date: Tue, 8 Jan 2013 14:11:57 +0100 Subject: [PATCH 15/34] #9 Java Doc Improvements of TunnelTargetgroup.java --- .../de/cismet/netutil/tunnel/TunnelTargetGroup.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/de/cismet/netutil/tunnel/TunnelTargetGroup.java b/src/main/java/de/cismet/netutil/tunnel/TunnelTargetGroup.java index 88fb2fc..f92151b 100644 --- a/src/main/java/de/cismet/netutil/tunnel/TunnelTargetGroup.java +++ b/src/main/java/de/cismet/netutil/tunnel/TunnelTargetGroup.java @@ -48,7 +48,7 @@ public TunnelTargetGroup(final String targetGroupkey, final String[] targetExpre //~ Methods ---------------------------------------------------------------- /** - * Getter for targetExpressions + * Getter for targetExpressions. * * @return targetExpressions */ @@ -57,7 +57,7 @@ public String[] getTargetExpressions() { } /** - * Setter for targetExpressions + * Setter for targetExpressions. * * @param targetExpressions targetExpressions */ @@ -66,7 +66,7 @@ public void setTargetExpressions(final String[] targetExpressions) { } /** - * Getter for targetGroupkey + * Getter for targetGroupkey. * * @return targetGroupkey */ @@ -75,7 +75,7 @@ public String getTargetGroupkey() { } /** - * Setter for targetGroupkey + * Setter for targetGroupkey. * * @param targetGroupkey targetGroupkey */ @@ -84,7 +84,7 @@ public void setTargetGroupkey(final String targetGroupkey) { } /** - * Tests whether the String matches or not + * Tests whether the String matches or not. * * @param candidate given String * From f47997a2016595c9388dd3c91816532a2ae8b906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCsel?= Date: Tue, 8 Jan 2013 14:12:47 +0100 Subject: [PATCH 16/34] #9 Java Doc Improvements of Package de.cismet.remote --- .../AbstractRESTRemoteControlMethod.java | 20 +++++++++---------- .../RESTRemoteControlMethodRegistry.java | 14 ++++++------- .../RESTRemoteControlMethodsApplication.java | 6 +++--- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/main/java/de/cismet/remote/AbstractRESTRemoteControlMethod.java b/src/main/java/de/cismet/remote/AbstractRESTRemoteControlMethod.java index 83ab8ca..c7bfa7e 100644 --- a/src/main/java/de/cismet/remote/AbstractRESTRemoteControlMethod.java +++ b/src/main/java/de/cismet/remote/AbstractRESTRemoteControlMethod.java @@ -28,7 +28,7 @@ public abstract class AbstractRESTRemoteControlMethod implements RESTRemoteContr * @param port port * @param path path * - * @throws NullPointerException "path must not be null" + * @throws NullPointerException "path must not be null" * @throws IllegalArgumentException "path must not be empty" or "path has to start with '/'" */ public AbstractRESTRemoteControlMethod(final int port, final String path) { @@ -51,9 +51,9 @@ public AbstractRESTRemoteControlMethod(final int port, final String path) { //~ Methods ---------------------------------------------------------------- /** - * Getter for Port - * - * @return port + * Getter for Port. + * + * @return port */ @Override public int getPort() { @@ -61,9 +61,9 @@ public int getPort() { } /** - * Getter for Path - * - * @return path + * Getter for Path. + * + * @return path */ @Override public String getPath() { @@ -71,9 +71,9 @@ public String getPath() { } /** - * return as String - * - * @return Class + name + " path: " + path + " port: " + port + * return as String. + * + * @return Class + name + " path: " + path + " port: " + port */ @Override public String toString() { diff --git a/src/main/java/de/cismet/remote/RESTRemoteControlMethodRegistry.java b/src/main/java/de/cismet/remote/RESTRemoteControlMethodRegistry.java index 48ebf3a..659f0e6 100644 --- a/src/main/java/de/cismet/remote/RESTRemoteControlMethodRegistry.java +++ b/src/main/java/de/cismet/remote/RESTRemoteControlMethodRegistry.java @@ -37,12 +37,12 @@ private RESTRemoteControlMethodRegistry() { //~ Methods ---------------------------------------------------------------- /** - * caches RemoteMethods to portMapping + * caches RemoteMethods to portMapping. * * @param defaultPort default port * - * @throws IllegalStateException "RESTRemoteControlMethods have already been collected. " - + "Call RESTRemoteControlMethodRegistry.clear() to enable new gathering" + * @throws IllegalStateException "RESTRemoteControlMethods have already been collected. " + "Call + * RESTRemoteControlMethodRegistry.clear() to enable new gathering" */ public static synchronized void gatherRemoteMethods(final int defaultPort) { if (!portMapping.isEmpty()) { @@ -76,7 +76,7 @@ public static synchronized void gatherRemoteMethods(final int defaultPort) { } /** - * Gets the Methods of specified Port + * Gets the Methods of specified Port. * * @param port port * @@ -88,7 +88,7 @@ public static synchronized List getMethodsForPort(final } /** - * Gettter for Methodports + * Gettter for Methodports. * * @return Methodports */ @@ -97,14 +97,14 @@ public static synchronized Set getMethodPorts() { } /** - * Clears the Portmapping + * Clears the Portmapping. */ public static synchronized void clear() { portMapping.clear(); } /** - * Tests whether the map is empty or not + * Tests whether the map is empty or not. * * @return Trueif this map contains no key-value mappings */ diff --git a/src/main/java/de/cismet/remote/RESTRemoteControlMethodsApplication.java b/src/main/java/de/cismet/remote/RESTRemoteControlMethodsApplication.java index a9285c4..3595bc5 100644 --- a/src/main/java/de/cismet/remote/RESTRemoteControlMethodsApplication.java +++ b/src/main/java/de/cismet/remote/RESTRemoteControlMethodsApplication.java @@ -65,9 +65,9 @@ private void collectServiceClasses(final String portAsString) { } /** - * Getter for Classes - * - * @return class + * Getter for Classes. + * + * @return class */ @Override public synchronized Set> getClasses() { From fec932151fa961968c20a48749e60ed728452ee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCsel?= Date: Tue, 8 Jan 2013 14:14:06 +0100 Subject: [PATCH 17/34] #9 Java Doc Improvements of ConfigurationManager.java --- .../de/cismet/tools/configuration/ConfigurationManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/cismet/tools/configuration/ConfigurationManager.java b/src/main/java/de/cismet/tools/configuration/ConfigurationManager.java index 4a4ad02..5c1936f 100644 --- a/src/main/java/de/cismet/tools/configuration/ConfigurationManager.java +++ b/src/main/java/de/cismet/tools/configuration/ConfigurationManager.java @@ -524,8 +524,8 @@ public String getSubstitutionAttr(final Element e) { } /** - * Creates a {@link Set} from the given xml snippet. This implementation assumes that there is a single - * root {@link Element} whose only purpose is to wrap the {@link Element}s to be created. In other words this + * Creates a {@link Set} from the given xml snippet. This implementation assumes that there is a single root + * {@link Element} whose only purpose is to wrap the {@link Element}s to be created. In other words this * implementation will return the child {@link Element}s of the {@link Document}'s root {@link Element}. The * returned {@link Element}s are detached from their root so they can be inserted into another {@link Document}. * From 5f8bff61c7eeac6473ed4f533a98553409f74506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCsel?= Date: Tue, 8 Jan 2013 14:14:57 +0100 Subject: [PATCH 18/34] #9 Java Doc Improvements of Package de.cismet.tools --- src/main/java/de/cismet/tools/Base64.java | 2 +- .../cismet/tools/BlacklistClassloading.java | 8 +- .../java/de/cismet/tools/BrowserLauncher.java | 20 +- .../de/cismet/tools/CalculationCache.java | 5 +- src/main/java/de/cismet/tools/Calculator.java | 2 +- .../de/cismet/tools/CismetThreadPool.java | 9 +- .../java/de/cismet/tools/ConnectionInfo.java | 12 +- src/main/java/de/cismet/tools/Converter.java | 4 +- .../de/cismet/tools/CurrentStackTrace.java | 2 +- .../java/de/cismet/tools/DebugSwitches.java | 4 +- src/main/java/de/cismet/tools/FileUtils.java | 166 +++++++++-------- src/main/java/de/cismet/tools/JnlpTools.java | 2 +- .../de/cismet/tools/LinkedProperties.java | 173 ++++++++++-------- .../cismet/tools/NumberStringComparator.java | 2 +- .../de/cismet/tools/PasswordEncrypter.java | 135 +++++++------- .../tools/PasswordEncrypterException.java | 2 +- .../cismet/tools/PropertyEqualsProvider.java | 2 +- .../java/de/cismet/tools/PropertyReader.java | 2 +- .../java/de/cismet/tools/ScriptRunner.java | 10 +- src/main/java/de/cismet/tools/Sorter.java | 61 +++--- .../de/cismet/tools/StaticDebuggingTools.java | 2 +- .../de/cismet/tools/StaticDecimalTools.java | 4 +- .../java/de/cismet/tools/StaticHtmlTools.java | 4 +- .../java/de/cismet/tools/StaticXMLTools.java | 8 +- .../java/de/cismet/tools/StringTools.java | 4 +- .../java/de/cismet/tools/TextFromFile.java | 4 +- .../java/de/cismet/tools/TimeoutThread.java | 4 +- .../java/de/cismet/tools/URLSplitter.java | 22 +-- 28 files changed, 347 insertions(+), 328 deletions(-) diff --git a/src/main/java/de/cismet/tools/Base64.java b/src/main/java/de/cismet/tools/Base64.java index 6ec825e..4fb972c 100644 --- a/src/main/java/de/cismet/tools/Base64.java +++ b/src/main/java/de/cismet/tools/Base64.java @@ -8,7 +8,7 @@ package de.cismet.tools; /** - * Base64 Converter + * Base64 Converter. * * @author martin.scholl@cismet.de * @version $Revision$, $Date$ diff --git a/src/main/java/de/cismet/tools/BlacklistClassloading.java b/src/main/java/de/cismet/tools/BlacklistClassloading.java index 90ae250..66c1567 100644 --- a/src/main/java/de/cismet/tools/BlacklistClassloading.java +++ b/src/main/java/de/cismet/tools/BlacklistClassloading.java @@ -13,7 +13,7 @@ import java.util.Map; /** - * Blacklist + * Blacklist. * * @author srichter * @version $Revision$, $Date$ @@ -39,9 +39,9 @@ private BlacklistClassloading() { //~ Methods ---------------------------------------------------------------- /** - * Tests whether the class is available or not. - * It sends messages to the Logger, if he can't find the class identity(additional he adds the identity on the blacklist), - * if he already has the class on the blacklist or if the classname was null + * Tests whether the class is available or not. It sends messages to the Logger, if he can't find the class + * identity(additional he adds the identity on the blacklist), if he already has the class on the blacklist or if + * the classname was null * * @param classname classname to load * diff --git a/src/main/java/de/cismet/tools/BrowserLauncher.java b/src/main/java/de/cismet/tools/BrowserLauncher.java index bc4bb8d..bd9f7a1 100644 --- a/src/main/java/de/cismet/tools/BrowserLauncher.java +++ b/src/main/java/de/cismet/tools/BrowserLauncher.java @@ -460,8 +460,8 @@ private static Object locateBrowser() { } /** - * Attempts to open the default web browser to the gieven URL. - * In the second attempt he tries to open the url as a file. + * Attempts to open the default web browser to the gieven URL. In the second attempt he tries to open the url as a + * file. * * @param url DOCUMENT ME! */ @@ -489,14 +489,14 @@ public static void openURLorFile(final String url) { * * @param url The URL to open * - * @throws Exception - * @throws IOException - *