forked from IF-LK-2020/array
and
This commit is contained in:
@@ -173,6 +173,14 @@ public class Arrays {
|
||||
* Für ein leeres Array wird <code>false<code> zurück gegeben.
|
||||
*/
|
||||
public boolean and( boolean[] pArray ) {
|
||||
if (pArray == null || pArray.length == 0) {
|
||||
return false;
|
||||
}
|
||||
for (boolean b : pArray) {
|
||||
if (!b) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user