Tabnine Logo
BooleanUtils.or
Code IndexAdd Tabnine to your IDE (free)

How to use
or
method
in
org.apache.commons.lang3.BooleanUtils

Best Java code snippets using org.apache.commons.lang3.BooleanUtils.or (Showing top 19 results out of 315)

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(
org.apache.commons.lang3BooleanUtilsor

Javadoc

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 

Popular methods of BooleanUtils

  • toBoolean
    Converts a String to a Boolean throwing an exception if no match found. BooleanUtils.toBoolean("t
  • isTrue
    Checks if a Boolean value is true, handling null by returning false. BooleanUtils.isTrue(Boolean.
  • toBooleanObject
    Converts a String to a Boolean throwing an exception if no match. NOTE: This returns null and will
  • isFalse
    Checks if a Boolean value is false, handling null by returning false. BooleanUtils.isFalse(Boolea
  • isNotTrue
    Checks if a Boolean value is not true, handling null by returning true. BooleanUtils.isNotTrue(Bo
  • toStringTrueFalse
    Converts a boolean to a String returning 'true'or 'false'. BooleanUtils.toStringTrueFalse(true)
  • toBooleanDefaultIfNull
    Converts a Boolean to a boolean handling null. BooleanUtils.toBooleanDefaultIfNull(Boolean.TRUE,
  • toString
    Converts a boolean to a String returning one of the input Strings. BooleanUtils.toString(true, "t
  • isNotFalse
    Checks if a Boolean value is not false, handling null by returning true. BooleanUtils.isNotFalse(
  • and
    Performs an and on a set of booleans. BooleanUtils.and(true, true) = true BooleanUtils.a
  • toStringYesNo
    Converts a boolean to a String returning 'yes'or 'no'. BooleanUtils.toStringYesNo(true) = "yes"
  • xor
    Performs an xor on a set of booleans. BooleanUtils.xor(true, true) = false BooleanUtils.xor(fa
  • toStringYesNo,
  • xor,
  • toInteger,
  • compare,
  • negate,
  • toStringOnOff,
  • <init>,
  • toIntegerObject

Popular in Java

  • Making http post requests using okhttp
  • setScale (BigDecimal)
  • compareTo (BigDecimal)
  • findViewById (Activity)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now