/**
 * 
 */
package org.kuali.module.gl.util;

import java.util.regex.Pattern;

/**
 * @author Evans
 *
 */
public class StringHelper extends ObjectHelper {

	static public boolean isEmpty(String s) {
		return !isNull(s) && "".equals(s);
	}
	
	/**
	 * 
	 * @param s
	 * @return true if !isNull(s) && s.toString() is all dashes.
	 */
	static public boolean isDashes(String s) {
		return !isNull(s) && Pattern.matches("^-*$", s);
	}
	
	static public boolean isNullOrEmpty(String s) {
		return isNull(s) || isEmpty(s);
	}
	
	static public boolean isEmptyOrDashes(String s) {
		return isEmpty(s) || isDashes(s);
	}
	
	static public boolean isNullOrEmptyOrDashes(String s) {
		return isNullOrEmpty(s) || isDashes(s);
	}
}

@@ -1,15 +1,1218 @@
 /*
-*
 %0A * 
+Copyright (c) 2004, 2005 The National Association of College and University Business Officers,%0A * Cornell University, Trustees of Indiana University, Michigan State University Board of Trustees,%0A * Trustees of San Joaquin Delta College, University of Hawai'i, The Arizona Board of Regents on%0A * behalf of the University of Arizona, and the r*smart group.%0A * %0A * Licensed under the Educational Community License Version 1.0 (the %22License%22); By obtaining,%0A * using and/or copying this Original Work, you agree that you have read, understand, and will%0A * comply with the terms and conditions of the Educational Community License.%0A * %0A * You may obtain a copy of the License at:%0A * %0A * http://kualiproject.org/license.html%0A * %0A * THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING%0A * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE%0A * AND NONINFRINGEMENT.%0A * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES%0A * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,%0A * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.%0A *
 %0A */%0Apac

add copyright.