com.rationaleemotions.utils.Strings Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of simple-ssh Show documentation
Show all versions of simple-ssh Show documentation
A simple way of interacting with a remote host for executing commands, scp (upload and download)
The newest version!
package com.rationaleemotions.utils;
public final class Strings {
private Strings() {
//Defeat instantiation
}
/**
* @param text - The text that is to be tested.
* @return - true
if the text is neither null nor empty (after trimming)
*/
public static boolean isNotNullAndNotEmpty(String text) {
return text != null && !text.trim().isEmpty();
}
/**
* @param text - The text that is to be tested.
* @return - true
if the text is either null or empty (after trimming)
*/
public static boolean isNullOrEmpty(String text) {
return text == null || text.trim().isEmpty();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy