[OmniFaces utilities] The
isAnyEmpty()
method returns true
if at least one value is empty.Method:
See also: Utils#isEmpty()
String one = "one";
String two =
"two";
List<String>
oneandtwolist = new ArrayList<>();
Map<String,
String> oneandtwomap = new HashMap<>();
// true, the list and the map are empty
boolean isanyempty =
Utils.isAnyEmpty(one, two, oneandtwolist, oneandtwomap);
oneandtwolist.add(one);
oneandtwolist.add(two);
// true, the map is empty
boolean isanyempty =
Utils.isAnyEmpty(one, two, oneandtwolist, oneandtwomap);
oneandtwomap.put(one,
one);
oneandtwomap.put(two,
two);
// false, there is no empty values with respect to Utils#isEmpty()
boolean isanyempty =
Utils.isAnyEmpty(one, two, oneandtwolist, oneandtwomap);
Niciun comentariu :
Trimiteți un comentariu