本文整理了Java中org.apache.commons.lang3.BooleanUtils.isNotFalse()
方法的一些代码示例,展示了BooleanUtils.isNotFalse()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BooleanUtils.isNotFalse()
方法的具体详情如下:
包路径:org.apache.commons.lang3.BooleanUtils
类名称:BooleanUtils
方法名:isNotFalse
[英]Checks if a Boolean value is not false, handling null by returning true.
BooleanUtils.isNotFalse(Boolean.TRUE) = true
BooleanUtils.isNotFalse(Boolean.FALSE) = false
BooleanUtils.isNotFalse(null) = true
[中]检查布尔值是否为false,通过返回true处理null。
BooleanUtils.isNotFalse(Boolean.TRUE) = true
BooleanUtils.isNotFalse(Boolean.FALSE) = false
BooleanUtils.isNotFalse(null) = true
代码示例来源:origin: org.apache.commons/commons-lang3
@Test
public void test_isNotFalse_Boolean() {
assertTrue(BooleanUtils.isNotFalse(Boolean.TRUE));
assertFalse(BooleanUtils.isNotFalse(Boolean.FALSE));
assertTrue(BooleanUtils.isNotFalse(null));
}
代码示例来源:origin: KostyaSha/github-integration-plugin
public boolean isCacheConnection() {
return isNotFalse(cacheConnection);
}
代码示例来源:origin: KostyaSha/github-integration-plugin
public boolean isCacheConnection() {
return isNotFalse(cacheConnection);
}
代码示例来源:origin: daniellitoc/xultimate-toolkit
/**
* <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(Boolean bool) {
return org.apache.commons.lang3.BooleanUtils.isNotFalse(bool);
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-test-lib
domReady = BooleanUtils.isNotFalse(BooleanUtils.toBooleanObject(domReadyAttr));
} catch (final StaleElementReferenceException e) {
代码示例来源:origin: AlexanderBartash/hybris-integration-intellij-idea-plugin
@Override
protected void init() {
this.fileChooser.addElementsMarkListener((ElementsChooser.ElementsMarkListener<HybrisModuleDescriptor>) (element, isMarked) -> {
if (isMarked) {
for (HybrisModuleDescriptor moduleDescriptor : element.getDependenciesPlainList()) {
if (BooleanUtils.isNotFalse(fileChooser.getElementMarkStates().get(moduleDescriptor))) {
continue;
}
fileChooser.setElementMarked(moduleDescriptor, true);
if (selectionMode == MANDATORY) {
moduleDescriptor.setImportStatus(MANDATORY);
}
}
}
fileChooser.repaint();
});
}
代码示例来源:origin: org.finra.herd/herd-dao
if (BooleanUtils.isNotFalse(objectMetadata.getOngoingRestore()))
代码示例来源:origin: FINRAOS/herd
if (BooleanUtils.isNotFalse(objectMetadata.getOngoingRestore()))
代码示例来源:origin: com.haulmont.cuba/cuba-gui
protected void loadVisible(FieldGroup resultComponent, FieldGroup.FieldConfig field) {
Element element = field.getXmlDescriptor();
if (element != null) {
String visible = element.attributeValue("visible");
if (StringUtils.isNotEmpty(visible)) {
field.setVisible(Boolean.parseBoolean(visible));
}
}
if (!field.isCustom() && BooleanUtils.isNotFalse(field.isVisible())) {
MetaClass metaClass = getMetaClass(resultComponent, field);
MetaPropertyPath propertyPath = getMetadataTools().resolveMetaPropertyPath(metaClass, field.getProperty());
checkNotNullArgument(propertyPath, "Could not resolve property path '%s' in '%s'", field.getId(), metaClass);
if (!getSecurity().isEntityAttrReadPermitted(metaClass, propertyPath.toString())) {
field.setVisible(false);
}
}
}
代码示例来源:origin: com.haulmont.cuba/cuba-gui
protected void loadEditable(FieldGroup resultComponent, FieldGroup.FieldConfig field) {
Element element = field.getXmlDescriptor();
if (element != null) {
String editable = element.attributeValue("editable");
if (StringUtils.isNotEmpty(editable)) {
field.setEditable(Boolean.parseBoolean(editable));
}
}
if (!field.isCustom() && BooleanUtils.isNotFalse(field.isEditable())) {
MetaClass metaClass = getMetaClass(resultComponent, field);
MetaPropertyPath propertyPath = getMetadataTools().resolveMetaPropertyPath(metaClass, field.getProperty());
checkNotNullArgument(propertyPath, "Could not resolve property path '%s' in '%s'", field.getId(), metaClass);
if (!getSecurity().isEntityAttrUpdatePermitted(metaClass, propertyPath.toString())) {
field.setEditable(false);
}
}
}
代码示例来源:origin: pl.edu.icm.synat/synat-portal-core
@Override
public String resolveThumbnailUrl(BriefDictionaryData briefElementData) {
String contextPath = getContextPathIfExists();
if (briefElementData instanceof ElementWithThumbnailData && ((ElementWithThumbnailData) briefElementData).getThumbnailPath() != null) {
return resolveThumbnailUrl((ElementWithThumbnailData) briefElementData, contextPath);
} else if (briefElementData instanceof ObjectDetails && ((ObjectDetails) briefElementData).getObjectType() != null) {
return resolveThumbnailUrl((ObjectDetails) briefElementData, contextPath);
} else if (briefElementData instanceof PersonData) {
PersonData person = (PersonData) briefElementData;
//TODO userProfile requests optimalization (do tego moentntu rpofil jest pobierany z 2-3 razy)
if (USER_ROLES.contains(person.getPortalRole()) && BooleanUtils.isNotFalse(person.isHasAvatar())
&& userBusinessService.getUserAvatar(person.getId()) != null) {
return contextPath + "/user/" + briefElementData.getId() + "/avatar.jpg";
} else {
return contextPath + DefaultThumbnailUrlEnum.PERSON.getThumbnailUrl();
}
} else if (briefElementData instanceof DiscussionGroup) {
return contextPath + DefaultThumbnailUrlEnum.DISCUSSION_GROUP.getThumbnailUrl();
} else if (briefElementData instanceof DiscussionThread) {
return contextPath + DefaultThumbnailUrlEnum.DISCUSSION_THREAD.getThumbnailUrl();
} else {
return contextPath + DefaultThumbnailUrlEnum.DEFAULT.getThumbnailUrl();
// TODO We should have some generic thumbnail withasterisk.
}
}
代码示例来源:origin: com.haulmont.cuba/cuba-web
filterEntity.setApplyDefault(BooleanUtils.isNotFalse(folder.getApplyDefault()));
if (folder instanceof SearchFolder) {
filterEntity.setIsSet(((SearchFolder) folder).getIsSet());
代码示例来源:origin: com.haulmont.cuba/cuba-gui
|| (filterEntity.getFolder() != null && BooleanUtils.isNotFalse(filterEntity.getApplyDefault()))) {
apply(true);
代码示例来源:origin: apache/maven-release
if ( BooleanUtils.isNotFalse( prepareRequest.getResume() ) )
代码示例来源:origin: apache/maven-release
if ( BooleanUtils.isNotFalse( performRequest.getClean() ) )
内容来源于网络,如有侵权,请联系作者删除!