Java Utililty Methods Array Value Any

List of utility methods to do Array Value Any

Description

The list of methods to do Array Value Any are organized into topic(s).

Method

booleanany(boolean[] b)
any
for (int i = 0; i < b.length; i++)
    if (b[i])
        return true;
return false;
booleanany(boolean[] values)
any
for (boolean value : values)
    if (value)
        return true;
return false;
Stringany(final String a, final String b)
any
if (a != null && a.length() > 0) {
    return a;
return b;
booleananyAreEmpty(String... words)
Return whether any of the input strings are empty or null.
for (String word : words) {
    if ((word == null) || word.isEmpty()) {
        return true;
return false;
booleananyBlank(String... ss)
any Blank
if (null == ss || ss.length == 0) {
    return true;
for (String s : ss) {
    if (isBlank(s)) {
        return true;
return false;
booleananyEmpty(final String head, final String... tail)
any Empty
if (isEmpty(head)) {
    return true;
for (final String string : tail) {
    if (isEmpty(string)) {
        return true;
return false;
booleananyEmpty(String[] array)
any Empty
boolean foundEmpty = false;
for (String s : array) {
    if ("".equals(s)) {
        foundEmpty = true;
        break;
return foundEmpty;
...
booleananyEmptyField(String[] items)
any Empty Field
boolean isEmpty = false;
for (String item : items) {
    if (item.isEmpty()) {
        isEmpty = true;
        break;
return isEmpty;
...
booleananyEqual(int item, int... expected)
any Equal
for (int i : expected) {
    if (item == i)
        return true;
return false;
booleananyInherit(Class cl, Class[] otherClasses)
any Inherit
for (Class<?> otherClass : otherClasses) {
    if (otherClass.isAssignableFrom(cl)) {
        return true;
return false;