com.maileon.api.utils.BooleanHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of maileon-api-client Show documentation
Show all versions of maileon-api-client Show documentation
Client for Customer API of Maileon. The API Documentation is avalable under https://dev.maileon.com
The newest version!
package com.maileon.api.utils;
public class BooleanHelper {
/**
* This method parses the String value
and returns true if the value is "true", "yes" or "1" (ignoring case). null
is interpreted to be false.
*
* @param value string representation of boolean
* @return parsed value
*/
public static boolean parseBoolean(String value) {
if (value == null) {
return false;
}
String compare = value.toLowerCase();
return "true".equals(compare) || "1".equals(compare) || "yes".equals(compare);
}
private BooleanHelper() {
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy