本文整理了Java中org.crsh.util.Utils.join()
方法的一些代码示例,展示了Utils.join()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.join()
方法的具体详情如下:
包路径:org.crsh.util.Utils
类名称:Utils
方法名:join
暂无
代码示例来源:origin: crashub/crash
private CRaSHTaskDef validateAndParseCronLine(String cronLine) {
//
cronLine = cronLine.trim();
if (cronLine.length() == 0 || cronLine.charAt(0) == '#') {
return null;
}
//
List<String> cronLineParts = Arrays.asList(cronLine.split("\\s+"));
if (cronLineParts.size() < 6) {
return null;
}
//
String schedulePart = Utils.join(cronLineParts.subList(0, 5), " ");
String commandPart = Utils.join(cronLineParts.subList(5, cronLineParts.size()), " ");
try {
return new CRaSHTaskDef(new SchedulingPattern(schedulePart), commandPart);
}
catch (InvalidPatternException e) {
// ?
return null;
}
}
}
代码示例来源:origin: crashub/crash
public void assertRender(LineReader renderer, int width, String... expected) {
List<String> result = render(renderer, width);
if (result.size() != expected.length) {
throw failure("Was expecting the same number of lines got:" + Utils.join(result, "/") + " expected:" +
Utils.join(Arrays.asList(expected), "/"));
} else {
for (int i = 0;i < expected.length;i++) {
if (!result.get(i).equals(expected[i])) {
throw failure("Was expecting line " + i + " <" + result.get(i) + "> to be equals to <" + expected[i] + ">");
}
}
}
}
}
代码示例来源:origin: crashub/crash
final InternetAddress[] addresses = InternetAddress.parse(Utils.join(recipients, ","));
代码示例来源:origin: org.crashub/crash.plugins.mail
final InternetAddress[] addresses = InternetAddress.parse(Utils.join(recipients, ","));
内容来源于网络,如有侵权,请联系作者删除!