本文整理匯總了Java中org.apache.commons.lang3.BooleanUtils.isFalse方法的典型用法代碼示例。如果您正苦於以下問題:Java BooleanUtils.isFalse方法的具體用法?Java BooleanUtils.isFalse怎麽用?Java BooleanUtils.isFalse使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.commons.lang3.BooleanUtils
的用法示例。
在下文中一共展示了BooleanUtils.isFalse方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: findOriginalTcAccount
import org.apache.commons.lang3.BooleanUtils; //導入方法依賴的package包/類
private TcAccount findOriginalTcAccount(@Nonnull String accountId, @Nonnull Boolean containsPassword) {
checkNotNull(accountId);
checkNotNull(containsPassword);
TcAccountExample tcAccountExample = new TcAccountExample();
tcAccountExample.setStartLine(0);
tcAccountExample.setPageSize(1);
tcAccountExample.createCriteria()
.andIdEqualTo(accountId)
.andDelectedEqualTo(false);
List<TcAccount> tcAccounts = tcAccountMapper.selectByExample(tcAccountExample);
if (CollectionUtils.isEmpty(tcAccounts)) {
return null;
}
TcAccount tcAccount = tcAccounts.get(0);
if (BooleanUtils.isFalse(containsPassword)) {
tcAccount.setPassword(null);
}
return tcAccount;
}
示例2: createNamedPipe
import org.apache.commons.lang3.BooleanUtils; //導入方法依賴的package包/類
public static synchronized boolean createNamedPipe(final File file) {
if (BooleanUtils.isFalse(namedPipeSupportedCached)) {
return false;
}
try {
//linux
execCommand("mkfifo", file.getAbsolutePath());
} catch (final Exception e) {
//mac os
try {
execCommand("mknod", file.getAbsolutePath());
} catch (final Exception e2) {
return false;
}
}
return true;
}
示例3: checkBackupVersions
import org.apache.commons.lang3.BooleanUtils; //導入方法依賴的package包/類
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;
}
示例4: ApiPatternMatcher
import org.apache.commons.lang3.BooleanUtils; //導入方法依賴的package包/類
public ApiPatternMatcher(String path) {
pathMatcher = new AntPathRequestMatcher(path);
httpMethodMatcher = httpServletRequest -> BooleanUtils.isFalse(HttpMethod.GET.matches(httpServletRequest.getMethod()));
}
示例5: compile
import org.apache.commons.lang3.BooleanUtils; //導入方法依賴的package包/類
public void compile(final Map<String, String> classes) {
if (classes.isEmpty()) {
return;
}
List<JavaFileObject> sources = new ArrayList<>();
for (Map.Entry<String, String> entry : classes.entrySet()) {
String qualifiedClassName = entry.getKey();
CharSequence javaSource = entry.getValue();
if (javaSource != null) {
final int dotPos = qualifiedClassName.lastIndexOf('.');
final String className = dotPos == -1 ? qualifiedClassName : qualifiedClassName.substring(dotPos + 1);
final String packageName = dotPos == -1 ? "" : qualifiedClassName.substring(0, dotPos);
final TemplateFileObject source = new TemplateFileObject(className, javaSource);
sources.add(source);
// Store the source file in the FileManager via package/class name.
// For source files, we add a .java extension
fileManager.putFileForInput(StandardLocation.SOURCE_PATH, packageName, className + JAVA_EXTENSION,
source);
}
}
//todo replace to common class Loader
List<String> options = new ArrayList<>();
options.add("-classpath");
options.add(getClassPathForCompile());
diagnostics = new DiagnosticCollector<>();
// Get a CompilationTask from the compiler and compile the sources
final JavaCompiler.CompilationTask task = compiler.getTask(null, fileManager, diagnostics, options, null, sources);
final Boolean result = task.call();
if (BooleanUtils.isFalse(result)) {
StringBuilder cause = new StringBuilder("\n");
for (Diagnostic d : diagnostics.getDiagnostics()) {
cause.append(d).append(" ");
}
throw new HistoneTemplateCompilerException("Compilation failed. Causes: " + cause);
}
}