本文整理了Java中de.unkrig.commons.nullanalysis.Nullable
类的一些代码示例,展示了Nullable
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Nullable
类的具体详情如下:
包路径:de.unkrig.commons.nullanalysis.Nullable
类名称:Nullable
暂无
代码示例来源:origin: de.unkrig/de-unkrig-commons
/**
* May or may not read from the {@code compressorInputStream}.
*
* @see #processFile(File, Predicate, ArchiveHandler, Predicate, CompressorHandler, NormalContentsHandler)
* @see #processStream(InputStream, Predicate, ArchiveHandler, Predicate, CompressorHandler,
* NormalContentsHandler)
*/
@Nullable T
handleCompressor(CompressorInputStream compressorInputStream, CompressionFormat compressionFormat)
throws IOException;
}
代码示例来源:origin: de.unkrig/de-unkrig-commons
/**
* May or may not read from the {@code inputStream}, and may or may not close it.
*
* @see #processFile(File, Predicate, ArchiveHandler, Predicate, CompressorHandler, NormalContentsHandler)
* @see CompressUtil#processStream(InputStream, Predicate, ArchiveHandler, Predicate, CompressorHandler,
* NormalContentsHandler)
*/
@Nullable T
handleNormalContents(InputStream inputStream) throws IOException;
}
代码示例来源:origin: de.unkrig/de-unkrig-commons
Command(CommandCode code, @Nullable String argument) {
this.code = code;
this.argument = argument;
}
}
代码示例来源:origin: de.unkrig/de-unkrig-commons
/**
* Prints an error condition.
*
* @see MessageFormat#format(Object)
*/
void error(String pattern, @Nullable Throwable t, Object... arguments);
代码示例来源:origin: de.unkrig/de-unkrig-commons
/**
* @param delegate {@code null} if a delegate is not (yet) desired
*/
public
ProxyHandler(@Nullable Handler delegate) {
this.delegate = delegate;
}
代码示例来源:origin: de.unkrig/de-unkrig-commons
/**
* Changes the delegate handler.
*
* @param delegate {@code null} if a delegate is no longer desired
*/
public void
setDelegate(@Nullable Handler delegate) {
this.delegate = delegate;
}
代码示例来源:origin: de.unkrig/de-unkrig-commons
/**
* @return An {@link InputStream} producing the contents of the resource, or {@code null} iff the resource cannot
* be accessed.
*/
@Nullable InputStream
retrieve(String resourceName) throws IOException;
代码示例来源:origin: de.unkrig/de-unkrig-commons
/**
* @param name The name of the directory or file to list, or {@code null} to list the current working
* directory
* @param lineConsumer Consumes the listing
*/
boolean
nameList(@Nullable String name, ConsumerWhichThrows<String, IOException> lineConsumer) throws IOException;
代码示例来源:origin: de.unkrig.commons/commons-file
/**
* May or may not read from the <var>compressorInputStream</var>.
*
* @see #processFile(File, Predicate, ArchiveHandler, Predicate, CompressorHandler, NormalContentsHandler)
* @see #processStream(InputStream, Predicate, ArchiveHandler, Predicate, CompressorHandler,
* NormalContentsHandler)
*/
@Nullable T
handleCompressor(CompressorInputStream compressorInputStream, CompressionFormat compressionFormat)
throws IOException;
}
代码示例来源:origin: de.unkrig/de-unkrig-commons
/**
* @return Whether the two values are equal in the sense of this map
*/
protected boolean
valuesEqual(@Nullable Object value1, @Nullable Object value2) {
return value1 == null ? value2 == null : value1.equals(value2);
}
}
代码示例来源:origin: de.unkrig.commons/commons-lang
/**
* Verifies that the <var>subject</var> is not {@code null}.
*
* @return The <var>subject</var>
* @throws NullPointerException with the given <var>message</var> iff the <var>subject</var> is {@code null}
*/
public static <T> T
notNull(@Nullable T subject, String message) {
if (subject == null) throw new NullPointerException(message);
return subject;
}
代码示例来源:origin: de.unkrig/de-unkrig-commons
@Override @Nullable public synchronized Boolean
produce() {
long now = System.currentTimeMillis();
if (now >= this.expirationTime) {
this.expirationTime = now + interval;
return true;
} else {
return false;
}
}
};
代码示例来源:origin: de.unkrig/de-unkrig-commons
@Override public boolean
evaluate(@Nullable Token<TokenType> token) {
return token == null || !JavaScanner.IGNORABLES.contains(token.type);
}
});
代码示例来源:origin: de.unkrig/de-unkrig-commons
/**
* @return The (possibly empty) subsequence captured by the group during the previous {@link
* #read(Pattern)}, {@link #peek(Pattern)} or {@link #peekRead(Pattern)} operation, or
* {@code null} if the group failed to match part of the input
* @see Matcher#group(int)
*/
@Nullable public String
group(int group) {
Matcher m = this.matcher;
assert m != null;
return m.group(group);
}
代码示例来源:origin: de.unkrig.commons/commons-lang
/**
* @return {@code null} iff the named category is unknown
*/
@Nullable public static Predicate<Integer>
unicodeCategoryFromName(String name) {
return Characters.UNICODE_CATEGORIES.get(name.toUpperCase(Locale.US));
}
private static final Map<String /*name*/, Predicate<Integer>> UNICODE_CATEGORIES;
代码示例来源:origin: de.unkrig/de-unkrig-commons
@Override @Nullable public Object
get(@Nullable Object key) {
assert key instanceof String;
Object result = this.get((String) key);
return result == this ? null : result;
}
代码示例来源:origin: de.unkrig/de-unkrig-commons
@Override public void
writeEntry(
final ArchiveOutputStream archiveOutputStream,
final ArchiveEntry archiveEntry,
@Nullable final String name,
final ConsumerWhichThrows<? super OutputStream, ? extends IOException> writeContents
) { throw new IllegalArgumentException(archiveOutputStream.getClass().getName()); }
代码示例来源:origin: de.unkrig.commons/commons-lang
private static void
saveKeyStoreToFile(KeyStore keyStore, File keyStoreFile, @Nullable char[] keyStorePassword)
throws GeneralSecurityException, IOException {
OutputStream os = new FileOutputStream(keyStoreFile);
try {
keyStore.store(os, keyStorePassword);
os.close();
} finally {
try { os.close(); } catch (Exception e) {}
}
}
代码示例来源:origin: de.unkrig.commons/commons-lang
/**
* Equivalent with {@link #getSubresources(ClassLoader, String, boolean, boolean)} with the <var>recurse</var>
* parameter set to {@code true}.
*/
public static Map<String, URL>
getSubresources(@Nullable ClassLoader classLoader, String name, boolean includeDirectories) throws IOException {
return ClassLoaders.getSubresources(classLoader, name, includeDirectories, true);
}
代码示例来源:origin: de.unkrig.commons/commons-util
@Override public boolean
containsKey(@Nullable Object key) {
for (int i = this.size - 1; i >= 0; i--) {
if (this.keysEqual(this.keys[i], key)) return true;
}
return false;
}
内容来源于网络,如有侵权,请联系作者删除!