本文整理了Java中org.apache.commons.lang3.BooleanUtils.or()
方法的一些代码示例,展示了BooleanUtils.or()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BooleanUtils.or()
方法的具体详情如下:
包路径:org.apache.commons.lang3.BooleanUtils
类名称:BooleanUtils
方法名:or
[英]Performs an or on an array of Booleans.
BooleanUtils.or(Boolean.TRUE, Boolean.TRUE) = Boolean.TRUE
BooleanUtils.or(Boolean.FALSE, Boolean.FALSE) = Boolean.FALSE
BooleanUtils.or(Boolean.TRUE, Boolean.FALSE) = Boolean.TRUE
BooleanUtils.or(Boolean.TRUE, Boolean.TRUE, Boolean.TRUE) = Boolean.TRUE
BooleanUtils.or(Boolean.FALSE, Boolean.FALSE, Boolean.TRUE) = Boolean.TRUE
BooleanUtils.or(Boolean.TRUE, Boolean.FALSE, Boolean.TRUE) = Boolean.TRUE
BooleanUtils.or(Boolean.FALSE, Boolean.FALSE, Boolean.FALSE) = Boolean.FALSE
[中]对布尔型数组执行or。
BooleanUtils.or(Boolean.TRUE, Boolean.TRUE) = Boolean.TRUE
BooleanUtils.or(Boolean.FALSE, Boolean.FALSE) = Boolean.FALSE
BooleanUtils.or(Boolean.TRUE, Boolean.FALSE) = Boolean.TRUE
BooleanUtils.or(Boolean.TRUE, Boolean.TRUE, Boolean.TRUE) = Boolean.TRUE
BooleanUtils.or(Boolean.FALSE, Boolean.FALSE, Boolean.TRUE) = Boolean.TRUE
BooleanUtils.or(Boolean.TRUE, Boolean.FALSE, Boolean.TRUE) = Boolean.TRUE
BooleanUtils.or(Boolean.FALSE, Boolean.FALSE, Boolean.FALSE) = Boolean.FALSE
代码示例来源:origin: springside/springside4
/**
* 多个值的or
*/
public static boolean or(final boolean... array) {
return BooleanUtils.or(array);
}
}
代码示例来源:origin: org.apache.commons/commons-lang3
return or(primitive) ? Boolean.TRUE : Boolean.FALSE;
} catch (final NullPointerException ex) {
throw new IllegalArgumentException("The array must not contain any null elements");
代码示例来源:origin: org.apache.commons/commons-lang3
@Test(expected = IllegalArgumentException.class)
public void testOr_primitive_nullInput() {
BooleanUtils.or((boolean[]) null);
}
代码示例来源:origin: org.apache.commons/commons-lang3
@Test(expected = IllegalArgumentException.class)
public void testOr_primitive_emptyInput() {
BooleanUtils.or(new boolean[] {});
}
代码示例来源:origin: org.apache.commons/commons-lang3
@Test(expected = IllegalArgumentException.class)
public void testOr_object_nullElementInput() {
BooleanUtils.or(new Boolean[] {null});
}
代码示例来源:origin: org.apache.commons/commons-lang3
@Test(expected = IllegalArgumentException.class)
public void testOr_object_nullInput() {
BooleanUtils.or((Boolean[]) null);
}
代码示例来源:origin: org.apache.commons/commons-lang3
@Test(expected = IllegalArgumentException.class)
public void testOr_object_emptyInput() {
BooleanUtils.or(new Boolean[] {});
}
代码示例来源:origin: org.apache.commons/commons-lang3
@Test
public void testOr_primitive_validInput_2items() {
assertTrue(
"False result for (true, true)",
BooleanUtils.or(new boolean[] { true, true }));
assertTrue(
"True result for (false, false)",
! BooleanUtils.or(new boolean[] { false, false }));
assertTrue(
"False result for (true, false)",
BooleanUtils.or(new boolean[] { true, false }));
assertTrue(
"False result for (false, true)",
BooleanUtils.or(new boolean[] { false, true }));
}
代码示例来源:origin: org.apache.commons/commons-lang3
@Test
public void testOr_object_validInput_2items() {
assertTrue(
"False result for (true, true)",
BooleanUtils
.or(new Boolean[] { Boolean.TRUE, Boolean.TRUE })
.booleanValue());
assertTrue(
"True result for (false, false)",
! BooleanUtils
.or(new Boolean[] { Boolean.FALSE, Boolean.FALSE })
.booleanValue());
assertTrue(
"False result for (true, false)",
BooleanUtils
.or(new Boolean[] { Boolean.TRUE, Boolean.FALSE })
.booleanValue());
assertTrue(
"False result for (false, true)",
BooleanUtils
.or(new Boolean[] { Boolean.FALSE, Boolean.TRUE })
.booleanValue());
}
代码示例来源:origin: org.apache.commons/commons-lang3
@Test
public void testOr_primitive_validInput_3items() {
assertTrue(
"False result for (false, false, true)",
BooleanUtils.or(new boolean[] { false, false, true }));
assertTrue(
"False result for (false, true, false)",
BooleanUtils.or(new boolean[] { false, true, false }));
assertTrue(
"False result for (true, false, false)",
BooleanUtils.or(new boolean[] { true, false, false }));
assertTrue(
"False result for (true, true, true)",
BooleanUtils.or(new boolean[] { true, true, true }));
assertTrue(
"True result for (false, false)",
! BooleanUtils.or(new boolean[] { false, false, false }));
assertTrue(
"False result for (true, true, false)",
BooleanUtils.or(new boolean[] { true, true, false }));
assertTrue(
"False result for (true, false, true)",
BooleanUtils.or(new boolean[] { true, false, true }));
assertTrue(
"False result for (false, true, true)",
BooleanUtils.or(new boolean[] { false, true, true }));
}
@Test(expected = IllegalArgumentException.class)
代码示例来源:origin: org.apache.commons/commons-lang3
"False result for (false, false, true)",
BooleanUtils
.or(
new Boolean[] {
Boolean.FALSE,
"False result for (false, true, false)",
BooleanUtils
.or(
new Boolean[] {
Boolean.FALSE,
"False result for (true, false, false)",
BooleanUtils
.or(
new Boolean[] {
Boolean.TRUE,
"False result for (true, true, true)",
BooleanUtils
.or(new Boolean[] { Boolean.TRUE, Boolean.TRUE, Boolean.TRUE })
.booleanValue());
! BooleanUtils.or(
new Boolean[] {
Boolean.FALSE,
BooleanUtils.or(
new Boolean[] {
代码示例来源:origin: xuminwlt/j360-dubbo-app-all
/**
* 多个值的or
*/
public static boolean or(final boolean... array) {
return BooleanUtils.or(array);
}
代码示例来源:origin: io.springside/springside-utils
/**
* 多个值的or
*/
public static boolean or(final boolean... array) {
return BooleanUtils.or(array);
}
代码示例来源:origin: DarLiner/vjtools
/**
* 多个值的or
*/
public static boolean or(final boolean... array) {
return BooleanUtils.or(array);
}
}
代码示例来源:origin: de.knightsoft-net/gwt-commons-lang3
return or(primitive) ? Boolean.TRUE : Boolean.FALSE;
} catch (final NullPointerException ex) {
throw new IllegalArgumentException("The array must not contain any null elements");
代码示例来源:origin: io.virtdata/virtdata-lib-realer
return or(primitive) ? Boolean.TRUE : Boolean.FALSE;
} catch (final NullPointerException ex) {
throw new IllegalArgumentException("The array must not contain any null elements");
代码示例来源:origin: io.virtdata/virtdata-lib-curves4
return or(primitive) ? Boolean.TRUE : Boolean.FALSE;
} catch (final NullPointerException ex) {
throw new IllegalArgumentException("The array must not contain any null elements");
代码示例来源:origin: it.unimi.dsi/webgraph
if (previousWasLocal) for(int x: localCheckList) modifiedResultCounter[x] = false;
else Arrays.fill(modifiedResultCounter, false);
assert ! BooleanUtils.or(modifiedResultCounter);
代码示例来源:origin: torakiki/sejda
if (!BooleanUtils.or(new boolean[] { taskCliArguments.isDirectory(), taskCliArguments.isFiles(),
taskCliArguments.isFilesListConfig() })) {
throw new SejdaRuntimeException(
内容来源于网络,如有侵权,请联系作者删除!