Tabnine Logo
StringUtil.isEmpty
Code IndexAdd Tabnine to your IDE (free)

How to use
isEmpty
method
in
com.cloudhopper.commons.util.StringUtil

Best Java code snippets using com.cloudhopper.commons.util.StringUtil.isEmpty (Showing top 15 results out of 315)

origin: com.cloudhopper/ch-smpp

/**
 * Validation method to guarantee that an err value passed in is valid by
 * smpp 3.4 spec
 * 
 * @param errorCode
 * @return
 */
private static boolean isValidErrorCode(String errorCode) {
  if (StringUtil.isEmpty(errorCode)
      || (!StringUtil.isEmpty(errorCode) && errorCode.length() <= FIELD_ERR_MAX_LEN))
    return true;
  else
    return false;
}
origin: org.restcomm.smpp/ch-smpp

/**
 * Validation method to guarantee that an err value passed in is valid by
 * smpp 3.4 spec
 * 
 * @param errorCode
 * @return
 */
private static boolean isValidErrorCode(String errorCode) {
  if (StringUtil.isEmpty(errorCode)
      || (!StringUtil.isEmpty(errorCode) && errorCode.length() <= FIELD_ERR_MAX_LEN))
    return true;
  else
    return false;
}
origin: twitter-archive/cloudhopper-smpp

/**
 * Validation method to guarantee that an err value passed in is valid by
 * smpp 3.4 spec
 * 
 * @param errorCode
 * @return
 */
private static boolean isValidErrorCode(String errorCode) {
  if (StringUtil.isEmpty(errorCode)
      || (!StringUtil.isEmpty(errorCode) && errorCode.length() <= FIELD_ERR_MAX_LEN))
    return true;
  else
    return false;
}
origin: com.fizzed/ch-smpp

/**
 * Validation method to guarantee that an err value passed in is valid by
 * smpp 3.4 spec
 * 
 * @param errorCode
 * @return
 */
private static boolean isValidErrorCode(String errorCode) {
  if (StringUtil.isEmpty(errorCode)
      || (!StringUtil.isEmpty(errorCode) && errorCode.length() <= FIELD_ERR_MAX_LEN))
    return true;
  else
    return false;
}
origin: com.cloudhopper/ch-commons-util

public static String[] splitHostFQDN(String fqdn) {
  String[] result = new String[2];
  if (StringUtil.isEmpty(fqdn)) {
    return result;
  }
  // try to determine the domain name
  int pos = fqdn.indexOf('.');
  if (pos >= 0) {
    result[0] = fqdn.substring(0, pos);
    if (pos+1 < fqdn.length()) {
      result[1] = fqdn.substring(pos+1);
    }
  } else {
    // entire string is the host name
    result[0] = fqdn;
  }
  return result;
}
origin: org.restcomm.smpp/ch-commons-util

public static String[] splitHostFQDN(String fqdn) {
  String[] result = new String[2];
  if (StringUtil.isEmpty(fqdn)) {
    return result;
  }
  // try to determine the domain name
  int pos = fqdn.indexOf('.');
  if (pos >= 0) {
    result[0] = fqdn.substring(0, pos);
    if (pos+1 < fqdn.length()) {
      result[1] = fqdn.substring(pos+1);
    }
  } else {
    // entire string is the host name
    result[0] = fqdn;
  }
  return result;
}
origin: com.cloudhopper/ch-commons-util

StringBuilder url = new StringBuilder();
if (!StringUtil.isEmpty(this.protocol)) {
  url.append(this.protocol);
  url.append("://");
if (!StringUtil.isEmpty(this.username)) {
  url.append(encode(this.username));
  if (this.password != null) {
if (!StringUtil.isEmpty(this.host)) {
  url.append(this.host);
if (!StringUtil.isEmpty(this.path)) {
  url.append(this.path);
if (!StringUtil.isEmpty(this.query)) {
  url.append('?');
  url.append(this.query);
origin: org.restcomm.smpp/ch-commons-util

StringBuilder url = new StringBuilder();
if (!StringUtil.isEmpty(this.protocol)) {
  url.append(this.protocol);
  url.append("://");
if (!StringUtil.isEmpty(this.username)) {
  url.append(encode(this.username));
  if (this.password != null) {
if (!StringUtil.isEmpty(this.host)) {
  url.append(this.host);
if (!StringUtil.isEmpty(this.path)) {
  url.append(this.path);
if (!StringUtil.isEmpty(this.query)) {
  url.append('?');
  url.append(this.query);
origin: com.cloudhopper/ch-commons-util

if (!StringUtil.isEmpty(hostFQDN)) {
origin: org.restcomm.smpp/ch-commons-util

if (!StringUtil.isEmpty(hostFQDN)) {
origin: com.fizzed/ch-smpp

if (!StringUtil.isEmpty(fieldValue)) {
  if (fieldLabel.equalsIgnoreCase(FIELD_ID)) {
    dlr.messageId = fieldValue;
if (StringUtil.isEmpty(dlr.messageId)) {
  throw new DeliveryReceiptException(
      "Unable to find [id] field or empty value in delivery receipt message");
if (StringUtil.isEmpty(dlr.rawErrorCode) && dlr.errorCode < 0) {
  throw new DeliveryReceiptException(
      "Unable to find [err] field or empty value in delivery receipt message");
origin: com.cloudhopper/ch-smpp

if (!StringUtil.isEmpty(fieldValue)) {
  if (fieldLabel.equalsIgnoreCase(FIELD_ID)) {
    dlr.messageId = fieldValue;
if (StringUtil.isEmpty(dlr.messageId)) {
  throw new DeliveryReceiptException(
      "Unable to find [id] field or empty value in delivery receipt message");
if (StringUtil.isEmpty(dlr.rawErrorCode) && dlr.errorCode < 0) {
  throw new DeliveryReceiptException(
      "Unable to find [err] field or empty value in delivery receipt message");
origin: twitter-archive/cloudhopper-smpp

if (!StringUtil.isEmpty(fieldValue)) {
  if (fieldLabel.equalsIgnoreCase(FIELD_ID)) {
    dlr.messageId = fieldValue;
if (StringUtil.isEmpty(dlr.messageId)) {
  throw new DeliveryReceiptException(
      "Unable to find [id] field or empty value in delivery receipt message");
if (StringUtil.isEmpty(dlr.rawErrorCode) && dlr.errorCode < 0) {
  throw new DeliveryReceiptException(
      "Unable to find [err] field or empty value in delivery receipt message");
origin: org.restcomm.smpp/ch-smpp

if (!StringUtil.isEmpty(fieldValue)) {
  if (fieldLabel.equalsIgnoreCase(FIELD_ID)) {
    dlr.messageId = fieldValue;
if (StringUtil.isEmpty(dlr.messageId)) {
  throw new DeliveryReceiptException(
      "Unable to find [id] field or empty value in delivery receipt message");
if (StringUtil.isEmpty(dlr.rawErrorCode) && dlr.errorCode < 0) {
  throw new DeliveryReceiptException(
      "Unable to find [err] field or empty value in delivery receipt message");
origin: org.restcomm.smpp/ch-commons-xbean

XmlBeanProperty annotation = property.getField().getAnnotation(XmlBeanProperty.class);
if (annotation != null) {
  if (!StringUtil.isEmpty(annotation.value())) {
    valueAttrString = annotation.value();
  if (!StringUtil.isEmpty(annotation.key())) {
    keyAttrString = annotation.key();
  if (ch.getKeyProperty() == null) {
    if (StringUtil.isEmpty(keyAttrString)) {
      throw new PropertyIsEmptyException(propertyName, node.getPath(), obj.getClass(), "The XML attribute [key] was null or empty and is required");
    } else {
com.cloudhopper.commons.utilStringUtilisEmpty

Javadoc

Checks if the string is an empty value which is true if the string is null or if the string represents an empty string of "". Please note that a string with just a space " " would not be considered empty.

Popular methods of StringUtil

  • substituteWithProperties
    Searches string for occurrences of a pattern, extracts out a key name between the startStr and endSt
  • toStringWithNullAsEmpty
    Returns the value from calling "toString()" on the object, but is a safe version that gracefully han
  • SQLToUpperCase
    Convert string to uppercase Always use the java.util.ENGLISH locale
  • capitalize
    Safely capitalizes a string by converting the first character to upper case. Handles null, empty, an
  • compressQuotes
    Compress 2 adjacent (single or double) quotes into a single (s or d) quote when found in the middle
  • containsOnlyDigits
    Checks if a string contains only digits.
  • getAsciiBytes
    Get 7-bit ASCII character array from input String. The lower 7 bits of each character in the input s
  • getAsciiString
  • indexOf
    Finds the first occurrence of the targetString in the array of strings. Returns -1 if an occurrence
  • isEqual
    Checks if both strings are equal to each other. Safely handles the case where either string may be n
  • isPrintableChar
    Return true if the character is printable in ASCII. Not using Character.isLetterOrDigit(); applies t
  • isSafeChar
    Returns true if the char is considered a "safe" char. Please see documentation for isSafeString().
  • isPrintableChar,
  • isSafeChar,
  • quoteString,
  • readToString,
  • substituteWithEnvironment

Popular in Java

  • Parsing JSON documents to java classes using gson
  • startActivity (Activity)
  • runOnUiThread (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now