Codota Logo
BooleanUtils.isFalse
Code IndexAdd Codota to your IDE (free)

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

Best Java code snippets using org.apache.commons.lang3.BooleanUtils.isFalse (Showing top 20 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: org.apache.commons/commons-lang3

/**
 * <p>Checks if a {@code Boolean} value is <i>not</i> {@code false},
 * handling {@code null} by returning {@code true}.</p>
 *
 * <pre>
 *   BooleanUtils.isNotFalse(Boolean.TRUE)  = true
 *   BooleanUtils.isNotFalse(Boolean.FALSE) = false
 *   BooleanUtils.isNotFalse(null)          = true
 * </pre>
 *
 * @param bool  the boolean to check, null returns {@code true}
 * @return {@code true} if the input is null or true
 * @since 2.3
 */
public static boolean isNotFalse(final Boolean bool) {
  return !isFalse(bool);
}
origin: kiegroup/optaplanner

public void initBenchmarkReportDirectory(File benchmarkDirectory) {
  String timestampString = startingTimestamp.format(DateTimeFormatter.ofPattern("yyyy-MM-dd_HHmmss"));
  if (StringUtils.isEmpty(name)) {
    name = timestampString;
  }
  if (!benchmarkDirectory.mkdirs()) {
    if (!benchmarkDirectory.isDirectory()) {
      throw new IllegalArgumentException("The benchmarkDirectory (" + benchmarkDirectory
          + ") already exists, but is not a directory.");
    }
    if (!benchmarkDirectory.canWrite()) {
      throw new IllegalArgumentException("The benchmarkDirectory (" + benchmarkDirectory
          + ") already exists, but is not writable.");
    }
  }
  int duplicationIndex = 0;
  do {
    String directoryName = timestampString + (duplicationIndex == 0 ? "" : "_" + duplicationIndex);
    duplicationIndex++;
    benchmarkReportDirectory = new File(benchmarkDirectory,
        BooleanUtils.isFalse(aggregation) ? directoryName : directoryName + "_aggregation");
  } while (!benchmarkReportDirectory.mkdir());
  for (ProblemBenchmarkResult problemBenchmarkResult : unifiedProblemBenchmarkResultList) {
    problemBenchmarkResult.makeDirs();
  }
}
origin: org.apache.commons/commons-lang3

@Test
public void test_isFalse_Boolean() {
  assertFalse(BooleanUtils.isFalse(Boolean.TRUE));
  assertTrue(BooleanUtils.isFalse(Boolean.FALSE));
  assertFalse(BooleanUtils.isFalse(null));
}
origin: kiegroup/optaplanner

private <Solution_> ProblemBenchmarkResult<Solution_> buildProblemBenchmark(SolverConfigContext solverConfigContext,
    PlannerBenchmarkResult plannerBenchmarkResult,
    ProblemProvider<Solution_> problemProvider) {
  ProblemBenchmarkResult<Solution_> problemBenchmarkResult = new ProblemBenchmarkResult<>(plannerBenchmarkResult);
  problemBenchmarkResult.setName(problemProvider.getProblemName());
  problemBenchmarkResult.setProblemProvider(problemProvider);
  problemBenchmarkResult.setWriteOutputSolutionEnabled(
      writeOutputSolutionEnabled == null ? false : writeOutputSolutionEnabled);
  List<ProblemStatistic> problemStatisticList;
  if (BooleanUtils.isFalse(problemStatisticEnabled)) {
    if (!ConfigUtils.isEmptyCollection(problemStatisticTypeList)) {
      throw new IllegalArgumentException("The problemStatisticEnabled (" + problemStatisticEnabled
          + ") and problemStatisticTypeList (" + problemStatisticTypeList + ") can be used together.");
    }
    problemStatisticList = Collections.emptyList();
  } else {
    List<ProblemStatisticType> problemStatisticTypeList_ = (problemStatisticTypeList == null)
        ? Collections.singletonList(ProblemStatisticType.BEST_SCORE) : problemStatisticTypeList;
    problemStatisticList = new ArrayList<>(problemStatisticTypeList_.size());
    for (ProblemStatisticType problemStatisticType : problemStatisticTypeList_) {
      problemStatisticList.add(problemStatisticType.buildProblemStatistic(problemBenchmarkResult));
    }
  }
  problemBenchmarkResult.setProblemStatisticList(problemStatisticList);
  problemBenchmarkResult.setSingleBenchmarkResultList(new ArrayList<>());
  return problemBenchmarkResult;
}
origin: kiegroup/optaplanner

Collection<GenuineVariableDescriptor> variableDescriptors = deduceVariableDescriptorList(
    entitySelector.getEntityDescriptor(), variableNameIncludeList);
if (BooleanUtils.isFalse(subPillarEnabled)
    && (minimumSubPillarSize != null || maximumSubPillarSize != null)) {
  throw new IllegalArgumentException("The pillarSelectorConfig (" + this
origin: metatron-app/metatron-discovery

@Override
public boolean enableSortField() {
 return BooleanUtils.isFalse(discontinuous) && unit != TimeUnit.YEAR;
}
origin: de.knightsoft-net/gwt-commons-lang3

/**
 * <p>Checks if a {@code Boolean} value is <i>not</i> {@code false},
 * handling {@code null} by returning {@code true}.</p>
 *
 * <pre>
 *   BooleanUtils.isNotFalse(Boolean.TRUE)  = true
 *   BooleanUtils.isNotFalse(Boolean.FALSE) = false
 *   BooleanUtils.isNotFalse(null)          = true
 * </pre>
 *
 * @param bool  the boolean to check, null returns {@code true}
 * @return {@code true} if the input is null or true
 * @since 2.3
 */
public static boolean isNotFalse(final Boolean bool) {
  return !isFalse(bool);
}
origin: io.virtdata/virtdata-lib-curves4

/**
 * <p>Checks if a {@code Boolean} value is <i>not</i> {@code false},
 * handling {@code null} by returning {@code true}.</p>
 *
 * <pre>
 *   BooleanUtils.isNotFalse(Boolean.TRUE)  = true
 *   BooleanUtils.isNotFalse(Boolean.FALSE) = false
 *   BooleanUtils.isNotFalse(null)          = true
 * </pre>
 *
 * @param bool  the boolean to check, null returns {@code true}
 * @return {@code true} if the input is null or true
 * @since 2.3
 */
public static boolean isNotFalse(final Boolean bool) {
  return !isFalse(bool);
}
origin: daniellitoc/xultimate-toolkit

/**
 * <p>Checks if a {@code Boolean} value is {@code false},
 * handling {@code null} by returning {@code false}.</p>
 *
 * <pre>
 *   BooleanUtils.isFalse(Boolean.TRUE)  = false
 *   BooleanUtils.isFalse(Boolean.FALSE) = true
 *   BooleanUtils.isFalse(null)          = false
 * </pre>
 *
 * @param bool  the boolean to check, null returns {@code false}
 * @return {@code true} only if the input is non-null and false
 * @since 2.1
 */
public static boolean isFalse(Boolean bool) {
   return org.apache.commons.lang3.BooleanUtils.isFalse(bool);
}
origin: io.virtdata/virtdata-lib-realer

/**
 * <p>Checks if a {@code Boolean} value is <i>not</i> {@code false},
 * handling {@code null} by returning {@code true}.</p>
 *
 * <pre>
 *   BooleanUtils.isNotFalse(Boolean.TRUE)  = true
 *   BooleanUtils.isNotFalse(Boolean.FALSE) = false
 *   BooleanUtils.isNotFalse(null)          = true
 * </pre>
 *
 * @param bool  the boolean to check, null returns {@code true}
 * @return {@code true} if the input is null or true
 * @since 2.3
 */
public static boolean isNotFalse(final Boolean bool) {
  return !isFalse(bool);
}
origin: com.haulmont.cuba/cuba-gui

@Override
protected void updateText() {
  if (operator == Op.NOT_EMPTY) {
    if (BooleanUtils.isTrue((Boolean) param.getValue())) {
      text = text.replace("not exists", "exists");
    } else if (BooleanUtils.isFalse((Boolean) param.getValue()) && !text.contains("not exists")) {
      text = text.replace("exists ", "not exists ");
    }
  }
  if (!isCollection) {
    if (operator == Op.ENDS_WITH || operator == Op.STARTS_WITH || operator == Op.CONTAINS || operator == Op.DOES_NOT_CONTAIN) {
      Matcher matcher = LIKE_PATTERN.matcher(text);
      if (matcher.find()) {
        String escapeCharacter = ("\\".equals(QueryUtils.ESCAPE_CHARACTER) || "$".equals(QueryUtils.ESCAPE_CHARACTER))
            ? QueryUtils.ESCAPE_CHARACTER + QueryUtils.ESCAPE_CHARACTER
            : QueryUtils.ESCAPE_CHARACTER;
        text = matcher.replaceAll("$1 ESCAPE '" + escapeCharacter + "' ");
      }
    }
  } else {
    if (operator == Op.CONTAINS) {
      text = text.replace("not exists", "exists");
    } else if (operator == Op.DOES_NOT_CONTAIN && !text.contains("not exists")) {
      text = text.replace("exists ", "not exists ");
    }
  }
}
origin: org.opensingular/singular-form-core

private static boolean isRejected(SInstance instance) {
  return isFalse(instance.asAtrAnnotation().approved());
}
origin: org.finra.herd/herd-dao

else if (BooleanUtils.isFalse(isParentTagNull))
origin: Nincraft/ModPackDownloader

private CurseFile checkBackupVersions(String releaseType, CurseFile curseFile, JSONObject fileListJson, String mcVersion, CurseFile newMod) {
  CurseFile returnMod = newMod;
  for (String backupVersion : arguments.getBackupVersions()) {
    log.debug("No files found for Minecraft {}, checking backup version {}", mcVersion, backupVersion);
    returnMod = getLatestVersion(releaseType, curseFile, fileListJson, backupVersion);
    if (BooleanUtils.isFalse(newMod.getSkipDownload())) {
      curseFile.setSkipDownload(null);
      log.debug("Found update for {} in Minecraft {}", curseFile.getName(), backupVersion);
      break;
    }
  }
  return returnMod;
}
origin: org.opensingular/singular-form-core

/**
 * Returns true if the given instance or any of its children is annotated with an refusal
 * @param instance
 * @return
 */
public boolean hasAnyRefusalOnTree(SInstance instance) {
  return SInstances.hasAny(instance, i -> hasAnnotation(i) && BooleanUtils.isFalse(i.asAtrAnnotation().annotation().getApproved()));
}
origin: org.opensingular/singular-form-core

/** Retorna true se a instância ou algum de seus filhos tiver uma anotação marcadada como não aprovada. */
public boolean hasAnyRefusal(SInstance instance) {
  return SInstances.hasAny(instance, i -> hasAnnotation(i) && BooleanUtils.isFalse(i.asAtrAnnotation().annotation().getApproved()));
}
origin: org.nuxeo.ecm.platform/nuxeo-apidoc-core

@Override
public void handleEvent(Event event) {
  if (!(event.getContext() instanceof DocumentEventContext)) {
    return;
  }
  DocumentEventContext ctx = (DocumentEventContext) event.getContext();
  DocumentModel srcDoc = ctx.getSourceDocument();
  if (!TYPE_NAME.equals(srcDoc.getType())) {
    return;
  }
  CoreSession session = ctx.getCoreSession();
  List<String> flags = Arrays.asList(PROP_LATEST_FT, PROP_LATEST_LTS);
  flags.forEach(flag -> {
    if (isFalse((Boolean) srcDoc.getPropertyValue(flag))) {
      return;
    }
    String query = String.format(DISTRIBUTION_QUERY, TYPE_NAME, flag);
    session.query(query)
        .stream()
        .filter(doc -> srcDoc.getId() == null || !doc.getId().equals(srcDoc.getId()))
        .forEach(doc -> {
      doc.setPropertyValue(flag, false);
      session.saveDocument(doc);
    });
  });
}
origin: com.haulmont.cuba/cuba-gui

@SuppressWarnings("unchecked")
protected TextField createTextField(Datatype datatype) {
  TextField textField = uiComponents.create(TextField.class);
  textField.setDatatype(datatype);
  if (!BooleanUtils.isFalse(editable)) {
    FilterHelper.ShortcutListener shortcutListener = new FilterHelper.ShortcutListener("add", new KeyCombination(KeyCombination.Key.ENTER)) {
      @Override
      public void handleShortcutPressed() {
        _addValue(textField);
      }
    };
    filterHelper.addShortcutListener(textField, shortcutListener);
  }
  return textField;
}
origin: info.magnolia.site/magnolia-site

@Override
public boolean isAvailable(Node node, TemplateDefinition templateDefinition) {
  if (node == null || templateDefinition == null) {
    return false;
  }
  // Templates with visible property is set to false are not available
  if (BooleanUtils.isFalse(templateDefinition.getVisible())) {
    return false;
  }
  if (templateDefinition instanceof ResourceTemplate && JcrResourceOrigin.RESOURCES_WORKSPACE.equals(getNodeWorkspaceName(node))) {
    return true;
  }
  // Without valid site we default to fallback
  final Site site = siteFunctions.site(node);
  if (site == null) {
    return fallbackTemplateAvailability.isAvailable(node, templateDefinition);
  }
  // Without valid template settings or availability we default to fallback too
  final TemplateSettings templateSettings = site.getTemplates();
  if (templateSettings == null || templateSettings.getAvailability() == null) {
    return fallbackTemplateAvailability.isAvailable(node, templateDefinition);
  }
  return site.getTemplates().getAvailability().isAvailable(node, templateDefinition);
}
origin: Evolveum/midpoint

private <T extends ObjectType> String addObject(PrismObject<T> object, boolean overwrite, ImportOptionsType importOptions,
    Task task, OperationResult parentResult) throws ObjectAlreadyExistsException, SchemaException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, SecurityViolationException {
  ObjectDelta<T> delta = DeltaFactory.Object.createAddDelta(object);
  Collection<ObjectDelta<? extends ObjectType>> deltas = MiscSchemaUtil.createCollection(delta);
  ModelExecuteOptions modelOptions;
  if (importOptions.getModelExecutionOptions() != null) {
    modelOptions = ModelExecuteOptions.fromModelExecutionOptionsType(importOptions.getModelExecutionOptions());
  } else {
    modelOptions = new ModelExecuteOptions();
  }
  if (modelOptions.getRaw() == null) {
    modelOptions.setRaw(true);
  }
  if (modelOptions.getOverwrite() == null) {
    modelOptions.setOverwrite(overwrite);
  }
  if (isFalse(importOptions.isEncryptProtectedValues()) && modelOptions.getNoCrypt() == null) {
    modelOptions.setNoCrypt(true);
  }
  modelService.executeChanges(deltas, modelOptions, task, parentResult);
  return deltas.iterator().next().getOid();
}
org.apache.commons.lang3BooleanUtilsisFalse

Javadoc

Checks if a Boolean value is false, handling null by returning false.

 
BooleanUtils.isFalse(Boolean.TRUE)  = false 
BooleanUtils.isFalse(Boolean.FALSE) = true 
BooleanUtils.isFalse(null)          = 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
  • 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(
  • or
    Performs an or on a set of booleans. BooleanUtils.or(true, true) = true BooleanUtils.or
  • 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

  • Updating database using SQL prepared statement
  • getSystemService (Context)
  • findViewById (Activity)
  • addToBackStack (FragmentTransaction)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • Notification (javax.management)
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