forked from IF-LK-2020/array
or
This commit is contained in:
@@ -192,8 +192,16 @@ public class Arrays {
|
||||
* Für ein leeres Array wird <code>false<code> zurück gegeben.
|
||||
*/
|
||||
public boolean or( boolean[] pArray ) {
|
||||
if (pArray == null || pArray.length == 0) {
|
||||
return false;
|
||||
}
|
||||
for (boolean b : pArray) {
|
||||
if (b) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prüft, ob <b>genau ein</b> Element in einem Array von
|
||||
|
||||
Reference in New Issue
Block a user