本文整理了Java中pl.edu.icm.ceon.commons.YaddaCollectionsUtils
类的一些代码示例,展示了YaddaCollectionsUtils
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YaddaCollectionsUtils
类的具体详情如下:
包路径:pl.edu.icm.ceon.commons.YaddaCollectionsUtils
类名称:YaddaCollectionsUtils
暂无
代码示例来源:origin: pl.edu.icm.ceon/ceon-converters-commons
/**
* Returns string constructed by appending all arguments
* with IDENTIFYING_STRING_SEPARATATOR as a separator.
*/
public static final String identifyingString(String... strings) {
if (YaddaCollectionsUtils.emptyArray(strings)) throw new IllegalArgumentException("Zero arguments not allowed");
return StringUtils.join(strings, IDENTIFYING_STRING_SEPARATOR);
}
代码示例来源:origin: pl.edu.icm.ceon/ceon-commons
/**
* Left here for compatibility with older versions of code.
* Deletes all files and (optionally) subdirectories under dir.
* @param dir directory to be deleted
* @param onlySubobjects if true only files and directories inside dir
* will be deleted (not dir itself)
* @throws IOException if deletion fails
* @deprecated use {@link FileUtils#deleteDir(File)}
*/
public static void deleteDir(File dir, boolean onlySubobjects) throws IOException {
if (dir.isDirectory()) {
File[] children = dir.listFiles();
for (int i=0; i<children.length; i++) {
deleteDir(children[i], false);
}
}
// The directory is now empty so delete it
if (!onlySubobjects && !dir.delete()) {
throw new IOException("Deletion of ["+dir.getAbsolutePath()+"] failed.");
}
}
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-old-models
public static boolean equalLangs(String lang1, String lang2) {
return YaddaCollectionsUtils.equalObjects(canonicalLang(lang1), canonicalLang(lang2));
}
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-old-models
/**
* Implementation of the equals comparison on the basis of equality of the primary key values.
* @param rhs
* @return boolean
*/
public boolean equals(Object obj)
{
if (obj == null)
return false;
if (! (obj instanceof Keyword))
return false;
Keyword that = (Keyword) obj;
return YaddaCollectionsUtils.equalObjects(getText(), that.getText())
&& YaddaCollectionsUtils.equalObjects(getLang(), that.getLang())
&& YaddaCollectionsUtils.equalObjects(getIndex(), that.getIndex());
}
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-old-models
/**
* @param langsArg
* The langs to set.
*/
public void setLangs(String langsArg) {
String[] arr = langsArg != null ? StringUtils.split(langsArg) : null;
if (YaddaCollectionsUtils.emptyArray(arr)) {
langList = Collections.emptyList();
langs = "";
} else {
langList = new ArrayList<String>(arr.length);
for (String lang : arr) {
langList.add(LanguageUtils.canonicalLangNoLowerCase(lang));
}
langs = StringUtils.join(langList, " ");
}
}
内容来源于网络,如有侵权,请联系作者删除!