本文整理汇总了Java中joptsimple.internal.Strings.EMPTY属性的典型用法代码示例。如果您正苦于以下问题:Java Strings.EMPTY属性的具体用法?Java Strings.EMPTY怎么用?Java Strings.EMPTY使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类joptsimple.internal.Strings
的用法示例。
在下文中一共展示了Strings.EMPTY属性的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onClientChat
@SubscribeEvent
public void onClientChat(ClientChatReceivedEvent event) {
String message = ( event.getMessage().getUnformattedText() );
if (message.contains(search.get()) && !message.startsWith(MC.getSession().getUsername() )) {
String append;
switch (mode.get().toUpperCase()) {
case "REPLY":
append = "/w ";
break;
case "CHAT":
default:
append = Strings.EMPTY;
break;
}
getLocalPlayer().sendChatMessage(append + reply.get());
}
}
示例2: BlockEntry
public BlockEntry(Block block, int meta, boolean check) throws BlockDoesNotExistException {
meta = Math.max(meta, 0);
if(check) BlockOptionHelper.requiresValidBlock(block, meta);
this.block = block;
this.meta = BlockOptionHelper.getAllBlocks(block).size() > 1 ? meta : -1;
this.uniqueId = getResourceName() + (isMetadata() ? ("::" + getMetadata()) : Strings.EMPTY);
}
示例3: next
public String next() {
if(!messages.isEmpty()) {
switch (type) {
case RANDOM:
return messages.get(ThreadLocalRandom.current().nextInt(messages.size()));
case SEQUENTIAL:
return messages.get((nextIndex++ % messages.size()));
}
}
return Strings.EMPTY;
}
示例4: readGzipStreamAsString
private static String readGzipStreamAsString(InputStream is) throws Exception {
TarArchiveInputStream tarIn = new TarArchiveInputStream(is);
try {
TarArchiveEntry tarEntry;
while ((tarEntry = tarIn.getNextTarEntry()) != null) {
if (tarEntry.isFile() && tarEntry.getName().endsWith(".txt")) {
return IOUtils.toString(tarIn, "UTF-8");
}
}
} finally {
tarIn.close();
}
return Strings.EMPTY;
}
示例5: getOnceFileVersion
private static final String getOnceFileVersion() {
if(STARTUP_ONCE.exists()) try {
return new String(Files.readAllBytes(STARTUP_ONCE.toPath()));
} catch (Throwable t) {}
return Strings.EMPTY;
}
示例6: getResourceName
public String getResourceName() {
return block != null ? (block.getRegistryName() != null ? block.getRegistryName().toString() : block.toString()) : Strings.EMPTY;
}
示例7: getPrettyName
public String getPrettyName() {
return block != null ? ((block.getRegistryName() != null ? block.getRegistryName().getResourcePath() : block.toString()) + (isMetadata() ? ":" + meta : Strings.EMPTY)) : Strings.EMPTY;
}
示例8: getName
@Override
public String getName() {
return Strings.EMPTY;
}
示例9: getAbsoluteName
@Override
public String getAbsoluteName() {
return Strings.EMPTY;
}
示例10: BaseMod
public BaseMod(Category category, String name) {
this(category, name, Strings.EMPTY);
}
示例11: CommandMod
public CommandMod(String name) {
super(name, Strings.EMPTY);
}