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

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

Best Java code snippets using org.apache.commons.lang3.BooleanUtils.isTrue (Showing top 20 results out of 801)

origin: org.apache.commons/commons-lang3

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

protected String buildKey(String propertyName, Long siteId, boolean forceEnvPrefix) {
  String key = propertyName;
  if (siteId != null) {
    key = siteId + "-" + key;
  }
  if (forceEnvPrefix || BooleanUtils.isTrue(originatedFromEnvironment.get())) {
    key = ENV_CACHE_PREFIX + "-" + key;
  }
  return key;
}
origin: Swagger2Markup/swagger2markup

/**
 * Retrieves the exclusiveMinimum value of a property
 *
 * @return the exclusiveMinimum value of the property
 */
public boolean getExclusiveMin() {
  if (property instanceof AbstractNumericProperty) {
    AbstractNumericProperty numericProperty = (AbstractNumericProperty) property;
    return BooleanUtils.isTrue(numericProperty.getExclusiveMinimum());
  }
  return false;
}
origin: Swagger2Markup/swagger2markup

/**
 * Retrieves the exclusiveMaximum value of a property
 *
 * @return the exclusiveMaximum value of the property
 */
public boolean getExclusiveMax() {
  if (property instanceof AbstractNumericProperty) {
    AbstractNumericProperty numericProperty = (AbstractNumericProperty) property;
    return BooleanUtils.isTrue((numericProperty.getExclusiveMaximum()));
  }
  return false;
}
origin: Swagger2Markup/swagger2markup

  /**
   * Checks if a property is read-only.
   *
   * @return true if the property is read-only
   */
  public boolean getReadOnly() {
    return BooleanUtils.isTrue(property.getReadOnly());
  }
}
origin: org.apache.commons/commons-lang3

@Test
public void test_isTrue_Boolean() {
  assertTrue(BooleanUtils.isTrue(Boolean.TRUE));
  assertFalse(BooleanUtils.isTrue(Boolean.FALSE));
  assertFalse(BooleanUtils.isTrue(null));
}
origin: Swagger2Markup/swagger2markup

/**
 * Builds a warning if method is deprecated.
 *
 * @param operation the Swagger Operation
 */
private void buildDeprecatedSection(MarkupDocBuilder markupDocBuilder, PathOperation operation) {
  if (BooleanUtils.isTrue(operation.getOperation().isDeprecated())) {
    markupDocBuilder.block(DEPRECATED_OPERATION, MarkupBlockStyle.EXAMPLE, null, MarkupAdmonition.CAUTION);
  }
}
origin: kiegroup/optaplanner

      + "both an easyScoreDirectorFactory and an droolsScoreDirectorFactory.");
if (BooleanUtils.isTrue(generateDroolsTestOnError)) {
  throw new IllegalArgumentException("The <generateDroolsTestOnError> option can only be set to true "
      + "when used together with droolsScoreDirectorFactory, not with easyScoreDirectorFactory.");
      + "both an incrementalScoreDirectorFactory and an droolsScoreDirectorFactory.");
if (BooleanUtils.isTrue(generateDroolsTestOnError)) {
  throw new IllegalArgumentException("The <generateDroolsTestOnError> option can only be set to true "
      + "when used together with droolsScoreDirectorFactory, not with incrementalScoreDirectorFactory.");
origin: BroadleafCommerce/BroadleafCommerce

/**
 * This helper method gathers the query fields for the given field and stores them in the List parameter.
 * @param currentField the current field
 * @param query
 * @param queryFields the query fields for this query
 * @param searchCriteria
 */
protected void getQueryFields(SolrQuery query, final List<String> queryFields, IndexField indexField, SearchCriteria searchCriteria) {
  if (indexField != null && BooleanUtils.isTrue(indexField.getSearchable())) {
    List<IndexFieldType> fieldTypes = indexField.getFieldTypes();
    for (IndexFieldType indexFieldType : fieldTypes) {
      FieldType fieldType = indexFieldType.getFieldType();
      // this will hold the list of query fields for our given field
      ExtensionResultHolder<List<String>> queryFieldResult = new ExtensionResultHolder<>();
      queryFieldResult.setResult(queryFields);
      // here we try to get the query field's for this search field
      ExtensionResultStatusType result = extensionManager.getProxy().getQueryField(query, searchCriteria, indexFieldType, queryFieldResult);
      if (Objects.equals(ExtensionResultStatusType.NOT_HANDLED, result)) {
        // if we didn't get any query fields we just add a default one
        String solrFieldName = shs.getPropertyNameForIndexField(indexFieldType.getIndexField(), fieldType);
        queryFields.add(solrFieldName);
      }
    }
  }
}
origin: BroadleafCommerce/BroadleafCommerce

boolean envOrigination = BooleanUtils.isTrue(originatedFromEnvironment.get());
if (property == null || StringUtils.isEmpty(property.getValue())) {
  if (envOrigination) {
origin: kiegroup/optaplanner

      + kieBaseConfigurationProperties + ") must be null.");
if (BooleanUtils.isTrue(generateDroolsTestOnError)) {
  return new TestGenDroolsScoreDirectorFactory<>(solutionDescriptor, kieContainer, ksessionName);
} else {
      + kieBaseConfigurationProperties + ") must be null.");
if (BooleanUtils.isTrue(generateDroolsTestOnError)) {
  return new TestGenLegacyDroolsScoreDirectorFactory<>(solutionDescriptor, kieBase, null, null);
} else {
if (BooleanUtils.isTrue(generateDroolsTestOnError)) {
  return new TestGenLegacyDroolsScoreDirectorFactory<>(solutionDescriptor, kieBase, scoreDrlList, scoreDrlFileList);
} else {
origin: Swagger2Markup/swagger2markup

typeInfos.italicText(labels.getLabel(FLAGS_COLUMN)).textLine(COLON + (BooleanUtils.isTrue(parameter.getRequired()) ? labels.getLabel(FLAGS_REQUIRED).toLowerCase() : labels.getLabel(FLAGS_OPTIONAL).toLowerCase()));
origin: BroadleafCommerce/BroadleafCommerce

if (BooleanUtils.isTrue(((BasicFieldMetadata) manyToFieldMetadata).getRequired())) {
  throw new ServiceException("Could not remove from the collection as the ManyToOne side is a"
      + " non-optional relationship. Consider changing 'optional=true' in the @ManyToOne annotation"
origin: apache/phoenix

collator = BooleanUtils.isTrue(useSpecialUpperCaseCollator) ? linguisticSort.getUpperCaseCollator(false)
    : linguisticSort.getCollator();
  LOG.trace(String.format("Collator: [strength: %d, decomposition: %d], Special-Upper-Case: %s",
      collator.getStrength(), collator.getDecomposition(),
      BooleanUtils.isTrue(useSpecialUpperCaseCollator)));
origin: DSpace/DSpace

/**
 * Can the user log in?
 *
 * @return boolean, yes/no
 */
public boolean canLogIn() {
  return BooleanUtils.isTrue(canLogIn);
}
origin: metatron-app/metatron-discovery

@JsonIgnore
public Role getAdminRole() {
 if(CollectionUtils.isEmpty(roles)) {
  return null;
 }
 Optional<Role> adminRole = roles.stream()
            .filter(role -> BooleanUtils.isTrue(role.getAdminRole()))
            .findFirst();
 return adminRole.orElse(null);
}
origin: metatron-app/metatron-discovery

@JsonIgnore
public Role getDefaultRole() {
 if(CollectionUtils.isEmpty(roles)) {
  return null;
 }
 Optional<Role> defaultRole = roles.stream()
                  .filter(role -> BooleanUtils.isTrue(role.getDefaultRole()))
                  .findFirst();
 return defaultRole.orElse(null);
}
origin: metatron-app/metatron-discovery

public Boolean rollup() {
 if (StringUtils.isEmpty(ingestion)) {
  return false;
 }
 IngestionInfo ingestionInfo = getIngestionInfo();
 if (ingestionInfo == null) {
  return false;
 }
 return BooleanUtils.isTrue(ingestionInfo.getRollup());
}
origin: metatron-app/metatron-discovery

@JsonIgnore
@Override
public String getFormat() {
 return BooleanUtils.isTrue(discontinuous) ? unit.discontFormat(byUnit) : unit.format();
}
origin: eclipse/eclipse.jdt.ls

public boolean isCompletionSnippetsSupported() {
  //@formatter:off
  return v3supported && capabilities.getTextDocument().getCompletion() != null
      && capabilities.getTextDocument().getCompletion().getCompletionItem() != null
      && isTrue(capabilities.getTextDocument().getCompletion().getCompletionItem().getSnippetSupport());
  //@formatter:on
}
org.apache.commons.lang3BooleanUtilsisTrue

Javadoc

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

 
BooleanUtils.isTrue(Boolean.TRUE)  = true 
BooleanUtils.isTrue(Boolean.FALSE) = false 
BooleanUtils.isTrue(null)          = false 

Popular methods of BooleanUtils

  • toBoolean
    Converts a String to a Boolean throwing an exception if no match found. BooleanUtils.toBoolean("t
  • 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(
  • 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

  • Running tasks concurrently on multiple threads
  • notifyDataSetChanged (ArrayAdapter)
  • onRequestPermissionsResult (Fragment)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Path (java.nio.file)
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • From CI to AI: The AI layer in your organization
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