本文整理了Java中org.elasticsearch.common.Strings.split()
方法的一些代码示例,展示了Strings.split()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Strings.split()
方法的具体详情如下:
包路径:org.elasticsearch.common.Strings
类名称:Strings
方法名:split
[英]Split a String at the first occurrence of the delimiter. Does not include the delimiter in the result.
[中]在第一次出现分隔符时拆分字符串。不在结果中包含分隔符。
代码示例来源:origin: org.elasticsearch/elasticsearch
public TaskId(String taskId) {
if (Strings.hasLength(taskId) && "unset".equals(taskId) == false) {
String[] s = Strings.split(taskId, ":");
if (s == null || s.length != 2) {
throw new IllegalArgumentException("malformed task id " + taskId);
}
this.nodeId = s[0];
try {
this.id = Long.parseLong(s[1]);
} catch (NumberFormatException ex) {
throw new IllegalArgumentException("malformed task id " + taskId, ex);
}
} else {
nodeId = "";
id = -1L;
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch
String[] s1 = Strings.splitStringByCommaToArray(source[i].toString());
for (String s : s1) {
String[] s2 = Strings.split(s, "=");
if (s2.length != 2) {
throw new IllegalArgumentException("malformed " + s);
String[] s1 = Strings.splitStringByCommaToArray(source[i].toString());
for (String s : s1) {
String[] s2 = Strings.split(s, "=");
if (s2.length != 2) {
throw new IllegalArgumentException("malformed " + s);
代码示例来源:origin: harbby/presto-connectors
String[] s1 = Strings.splitStringByCommaToArray(source[i].toString());
for (String s : s1) {
String[] s2 = Strings.split(s, "=");
if (s2.length != 2) {
throw new IllegalArgumentException("malformed " + s);
String[] s1 = Strings.splitStringByCommaToArray(source[i].toString());
for (String s : s1) {
String[] s2 = Strings.split(s, "=");
if (s2.length != 2) {
throw new IllegalArgumentException("malformed " + s);
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
public TaskId(String taskId) {
if (Strings.hasLength(taskId) && "unset".equals(taskId) == false) {
String[] s = Strings.split(taskId, ":");
if (s == null || s.length != 2) {
throw new IllegalArgumentException("malformed task id " + taskId);
}
this.nodeId = s[0];
try {
this.id = Long.parseLong(s[1]);
} catch (NumberFormatException ex) {
throw new IllegalArgumentException("malformed task id " + taskId, ex);
}
} else {
nodeId = "";
id = -1L;
}
}
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
String[] s1 = Strings.splitStringByCommaToArray(source[i].toString());
for (String s : s1) {
String[] s2 = Strings.split(s, "=");
if (s2.length != 2) {
throw new IllegalArgumentException("malformed " + s);
String[] s1 = Strings.splitStringByCommaToArray(source[i].toString());
for (String s : s1) {
String[] s2 = Strings.split(s, "=");
if (s2.length != 2) {
throw new IllegalArgumentException("malformed " + s);
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch
public TaskId(String taskId) {
if (Strings.hasLength(taskId) && "unset".equals(taskId) == false) {
String[] s = Strings.split(taskId, ":");
if (s == null || s.length != 2) {
throw new IllegalArgumentException("malformed task id " + taskId);
}
this.nodeId = s[0];
try {
this.id = Long.parseLong(s[1]);
} catch (NumberFormatException ex) {
throw new IllegalArgumentException("malformed task id " + taskId, ex);
}
} else {
nodeId = "";
id = -1L;
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch
String[] s1 = Strings.splitStringByCommaToArray(source[i].toString());
for (String s : s1) {
String[] s2 = Strings.split(s, "=");
if (s2.length != 2) {
throw new IllegalArgumentException("malformed " + s);
String[] s1 = Strings.splitStringByCommaToArray(source[i].toString());
for (String s : s1) {
String[] s2 = Strings.split(s, "=");
if (s2.length != 2) {
throw new IllegalArgumentException("malformed " + s);
代码示例来源:origin: apache/servicemix-bundles
public TaskId(String taskId) {
if (Strings.hasLength(taskId) && "unset".equals(taskId) == false) {
String[] s = Strings.split(taskId, ":");
if (s == null || s.length != 2) {
throw new IllegalArgumentException("malformed task id " + taskId);
}
this.nodeId = s[0];
try {
this.id = Long.parseLong(s[1]);
} catch (NumberFormatException ex) {
throw new IllegalArgumentException("malformed task id " + taskId, ex);
}
} else {
nodeId = "";
id = -1L;
}
}
代码示例来源:origin: apache/servicemix-bundles
String[] s1 = Strings.splitStringByCommaToArray(source[i].toString());
for (String s : s1) {
String[] s2 = Strings.split(s, "=");
if (s2.length != 2) {
throw new IllegalArgumentException("malformed " + s);
String[] s1 = Strings.splitStringByCommaToArray(source[i].toString());
for (String s : s1) {
String[] s2 = Strings.split(s, "=");
if (s2.length != 2) {
throw new IllegalArgumentException("malformed " + s);
代码示例来源:origin: harbby/presto-connectors
public TaskId(String taskId) {
if (Strings.hasLength(taskId) && "unset".equals(taskId) == false) {
String[] s = Strings.split(taskId, ":");
if (s == null || s.length != 2) {
throw new IllegalArgumentException("malformed task id " + taskId);
}
this.nodeId = s[0];
try {
this.id = Long.parseLong(s[1]);
} catch (NumberFormatException ex) {
throw new IllegalArgumentException("malformed task id " + taskId, ex);
}
} else {
nodeId = "";
id = -1L;
}
}
代码示例来源:origin: harbby/presto-connectors
element = deleteAny(element, charsToDelete);
String[] splittedElement = split(element, delimiter);
if (splittedElement == null) {
continue;
内容来源于网络,如有侵权,请联系作者删除!