01: /*
02: * Copyright 2005 by Lars Torunski
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: *
16: */
17: package com.torunski.crawler.util;
18:
19: /**
20: * Provides common sting utility methods.
21: *
22: * @author Lars Torunski
23: * @version $Revision: 1.1 $
24: */
25: public class StringUtil {
26:
27: private StringUtil() {
28: }
29:
30: /**
31: * @param s the string to be checked
32: * @return true if the string parameter contains at least one element
33: */
34: public static final boolean hasLength(String s) {
35: return (s != null) && (s.length() > 0);
36: }
37:
38: }
|