/** * <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); }
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; }
/** * 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; }
/** * 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; }
/** * Checks if a property is read-only. * * @return true if the property is read-only */ public boolean getReadOnly() { return BooleanUtils.isTrue(property.getReadOnly()); } }
/** * 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); } }
+ "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.");
/** * 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); } } } }
boolean envOrigination = BooleanUtils.isTrue(originatedFromEnvironment.get()); if (property == null || StringUtils.isEmpty(property.getValue())) { if (envOrigination) {
+ 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 {
typeInfos.italicText(labels.getLabel(FLAGS_COLUMN)).textLine(COLON + (BooleanUtils.isTrue(parameter.getRequired()) ? labels.getLabel(FLAGS_REQUIRED).toLowerCase() : labels.getLabel(FLAGS_OPTIONAL).toLowerCase()));
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"
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)));
/** * Can the user log in? * * @return boolean, yes/no */ public boolean canLogIn() { return BooleanUtils.isTrue(canLogIn); }
@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); }
@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); }
public Boolean rollup() { if (StringUtils.isEmpty(ingestion)) { return false; } IngestionInfo ingestionInfo = getIngestionInfo(); if (ingestionInfo == null) { return false; } return BooleanUtils.isTrue(ingestionInfo.getRollup()); }
@JsonIgnore @Override public String getFormat() { return BooleanUtils.isTrue(discontinuous) ? unit.discontFormat(byUnit) : unit.format(); }
public boolean isCompletionSnippetsSupported() { //@formatter:off return v3supported && capabilities.getTextDocument().getCompletion() != null && capabilities.getTextDocument().getCompletion().getCompletionItem() != null && isTrue(capabilities.getTextDocument().getCompletion().getCompletionItem().getSnippetSupport()); //@formatter:on }