This commit is contained in:
Tim Tersch
2020-08-27 11:00:00 +02:00
parent 18a1201ec5
commit 68f0f575b6

View File

@@ -192,8 +192,16 @@ public class Arrays {
* Für ein leeres Array wird <code>false<code> zurück gegeben. * Für ein leeres Array wird <code>false<code> zurück gegeben.
*/ */
public boolean or( boolean[] pArray ) { public boolean or( boolean[] pArray ) {
if (pArray == null || pArray.length == 0) {
return false;
}
for (boolean b : pArray) {
if (b) {
return true; return true;
} }
}
return false;
}
/** /**
* Prüft, ob <b>genau ein</b> Element in einem Array von * Prüft, ob <b>genau ein</b> Element in einem Array von