Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfekorb.btc2017-08-15 05:49:22 -0400
committerfekorb.btc2017-08-15 05:49:22 -0400
commit17106807ba8b6aca91980b45924f07c7aec28776 (patch)
tree3a55209cc7214ac20c7a5e02c4cec87a8fabe6d6
parente41b3a4c29af97deac6ea5f59c6d692fa947dea7 (diff)
downloadorg.eclipse.openk-platform.openk-repo-17106807ba8b6aca91980b45924f07c7aec28776.tar.gz
org.eclipse.openk-platform.openk-repo-17106807ba8b6aca91980b45924f07c7aec28776.tar.xz
org.eclipse.openk-platform.openk-repo-17106807ba8b6aca91980b45924f07c7aec28776.zip
Test
-rw-r--r--dev/de.openkonsequenz.common/src/main/java/de/openkonsequenz/string/StringToolkit.java134
1 files changed, 67 insertions, 67 deletions
diff --git a/dev/de.openkonsequenz.common/src/main/java/de/openkonsequenz/string/StringToolkit.java b/dev/de.openkonsequenz.common/src/main/java/de/openkonsequenz/string/StringToolkit.java
index 712140f0..a0f41012 100644
--- a/dev/de.openkonsequenz.common/src/main/java/de/openkonsequenz/string/StringToolkit.java
+++ b/dev/de.openkonsequenz.common/src/main/java/de/openkonsequenz/string/StringToolkit.java
@@ -1,68 +1,68 @@
-/**
- ******************************************************************************
- * Copyright © 2015-2017 BTC AG.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- ******************************************************************************
- */
-package de.openkonsequenz.string;
-
-/**
- * This class consists exclusively of static methods that operate on or return <code>String</code>s.
- *
- * @author Felix Korb
- */
-public final class StringToolkit {
-
- // Constructors
- private StringToolkit() {
- /* suppresses the instantiation! */
- }
-
- // Methods
- /**
- * Checks if the specified value has any content.
- *
- * @param value
- * the value
- * @return <code>true</code> if the value is not <code>""</code> and not <code>null</code>; <code>false</code> otherwise
- */
- public static boolean hasContent(String value) {
-
- return isValid(value, StringDefaults.UNSPECIFIED_LENGTH);
- }
-
- /**
- * Checks if the specified value is valid.<br/>
- * The minimum requirements for a valid value are:<br/>
- * <li><code>value != null</code></li>
- * <li><code>value.length > 0</code></li>
- *
- * @param value
- * the value
- * @param length
- * specifies the permitted length<br/>
- * <b><i>NOTE:</i></b><br/>
- * <code>UNSPECIFIED_LENGTH</code> allows a flexible length
- * @return the result
- */
- public static boolean isValid(String value, int length) {
-
- if(value == null)
- return false;
- else {
- if(value.isEmpty())
- return false;
- else {
- if(length == StringDefaults.UNSPECIFIED_LENGTH)
- return true;
- else
- return (value.length() == length);
- }
- }
- }
+/**
+ ******************************************************************************
+ * Copyright © 2015-2017 BTC AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ ******************************************************************************
+ */
+package de.openkonsequenz.string;
+
+/**
+ * This class consists exclusively of static methods that operate on or return <code>String</code>s.
+ *
+ * @author Felix Korb
+ */
+public final class StringToolkit {
+
+ // Constructors
+ private StringToolkit() {
+ /* suppresses the instantiation! */
+ }
+
+ // Methods
+ /**
+ * Checks if the specified value has any content.
+ *
+ * @param value
+ * the value
+ * @return <code>true</code> if the value is not <code>""</code> and not <code>null</code>; <code>false</code> otherwise
+ */
+ public static boolean hasContent(String value) {
+
+ return isValid(value, StringDefaults.UNSPECIFIED_LENGTH);
+ }
+
+ /**
+ * Checks if the specified value is valid.<br/>
+ * The minimum requirements for a valid value are:<br/>
+ * <li><code>value != null</code></li>
+ * <li><code>value.length > 0</code></li>
+ *
+ * @param value
+ * the value
+ * @param length
+ * specifies the permitted length<br/>
+ * <b><i>NOTE:</i></b><br/>
+ * <code>UNSPECIFIED_LENGTH</code> allows a flexible length
+ * @return the result
+ */
+ public static boolean isValid(String value, int length) {
+
+ if(value == null)
+ return false;
+ else {
+ if(value.isEmpty())
+ return false;
+ else {
+ if(length == StringDefaults.UNSPECIFIED_LENGTH)
+ return true;
+ else
+ return (value.length() == length);
+ }
+ }
+ }
} \ No newline at end of file

Back to the top