diff gnv-artifacts/src/main/java/de/intevation/gnv/utils/StringUtils.java @ 806:2cea76f1112e

Added Javadoc in utils package. gnv-artifacts/trunk@888 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 08 Apr 2010 13:10:39 +0000
parents 6cff63d0c434
children f953c9a559d8
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/utils/StringUtils.java	Thu Apr 08 11:31:44 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/utils/StringUtils.java	Thu Apr 08 13:10:39 2010 +0000
@@ -1,6 +1,8 @@
 package de.intevation.gnv.utils;
 
 /**
+ * Helper class which supports some methods for working with strings.
+ *
  * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a>
  */
 public final class StringUtils
@@ -8,6 +10,13 @@
     private StringUtils() {
     }
 
+    /**
+     * Append a string to a string array.
+     *
+     * @param haystack String array.
+     * @param straw String to append.
+     * @return the new string array.
+     */
     public static final String [] append(String [] haystack, String straw) {
         if (haystack == null) {
             return new String [] { straw };
@@ -18,6 +27,13 @@
         return nhaystack;
     }
 
+    /**
+     * Checks the existence of a string in a given string array.
+     *
+     * @param haystack String array.
+     * @param needle String for being checked.
+     * @return true, if the string is contained in <i>haystack</i> - else false.
+     */
     public static final boolean contains(String [] haystack, String needle) {
         if (haystack == null) {
             return false;

http://dive4elements.wald.intevation.org