Codota Logo
BooleanUtils.or
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
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_emptyInput() {
  BooleanUtils.or(new boolean[] {});
}
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_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-curves4

  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: 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

  • Start an intent from android
  • getExternalFilesDir (Context)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • orElseThrow (Optional)
  • Menu (java.awt)
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now