|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.logging.log4j.core.helpers.Strings
public class Strings
| Constructor Summary | |
|---|---|
Strings()
|
|
| Method Summary | |
|---|---|
static boolean |
isEmpty(CharSequence cs)
Checks if a CharSequence is empty ("") or null. |
static boolean |
isNotEmpty(CharSequence cs)
Checks if a CharSequence is not empty ("") and not null. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Strings()
| Method Detail |
|---|
public static boolean isEmpty(CharSequence cs)
Checks if a CharSequence is empty ("") or null.
Strings.isEmpty(null) = true
Strings.isEmpty("") = true
Strings.isEmpty(" ") = false
Strings.isEmpty("bob") = false
Strings.isEmpty(" bob ") = false
NOTE: This method changed in Lang version 2.0. It no longer trims the CharSequence. That functionality is available in isBlank().
Copied from Apache Commons Lang org.apache.commons.lang3.StringUtils.isEmpty(CharSequence)
cs - the CharSequence to check, may be null
true if the CharSequence is empty or nullpublic static boolean isNotEmpty(CharSequence cs)
Checks if a CharSequence is not empty ("") and not null.
StringUtils.isNotEmpty(null) = false
StringUtils.isNotEmpty("") = false
StringUtils.isNotEmpty(" ") = true
StringUtils.isNotEmpty("bob") = true
StringUtils.isNotEmpty(" bob ") = true
Copied from Apache Commons Lang org.apache.commons.lang3.StringUtils.isNotEmpty(CharSequence)
cs - the CharSequence to check, may be null
true if the CharSequence is not empty and not null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright © 1999-2013 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.