org.jgroups.util.Util.parseStringList()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(189)

本文整理了Java中org.jgroups.util.Util.parseStringList()方法的一些代码示例,展示了Util.parseStringList()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.parseStringList()方法的具体详情如下:
包路径:org.jgroups.util.Util
类名称:Util
方法名:parseStringList

Util.parseStringList介绍

暂无

代码示例

代码示例来源:origin: wildfly/wildfly

/** e.g. "bela,jeannette,michelle" --> List{"bela", "jeannette", "michelle"} */
public static List<String> parseCommaDelimitedStrings(String l) {
  return parseStringList(l,",");
}

代码示例来源:origin: wildfly/wildfly

protected static Collection<InetAddress> parseAddresses(String input) throws Exception {
  final String ADDRS="member-addrs=";
  Collection<InetAddress> retval=new ArrayList<>();
  int start_index=-1, end_index=-1;
  if(input != null && (start_index=input.indexOf(ADDRS)) >= 0) {
    input=input.substring(start_index + ADDRS.length()).trim();
    end_index=input.indexOf('\n');
    if(end_index > 0)
      input=input.substring(0, end_index);
    List<String> rsps=Util.parseStringList(input,",");
    for(String tmp: rsps) {
      int index2=tmp.lastIndexOf(':');
      if(index2 != -1)
        tmp=tmp.substring(0, index2);
      retval.add(InetAddress.getByName(tmp));
    }
  }
  return retval;
}

代码示例来源:origin: wildfly/wildfly

protocol_name=protocol_name.substring(0, index);
String attrs=rest.substring(index +1); // e.g. "num_sent,msgs,num_received_msgs"
list=Util.parseStringList(attrs, ",");

代码示例来源:origin: org.jgroups/com.springsource.org.jgroups

/** e.g. "bela,jeannette,michelle" --> List{"bela", "jeannette", "michelle"} */
public static java.util.List parseCommaDelimitedStrings(String l) {
  return parseStringList(l, ",");
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

/** e.g. "bela,jeannette,michelle" --> List{"bela", "jeannette", "michelle"} */
public static List<String> parseCommaDelimitedStrings(String l) {
  return parseStringList(l,",");
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

protected static Collection<InetAddress> parseAddresses(String input) throws Exception {
  final String ADDRS="member-addrs=";
  Collection<InetAddress> retval=new ArrayList<>();
  int start_index=-1, end_index=-1;
  if(input != null && (start_index=input.indexOf(ADDRS)) >= 0) {
    input=input.substring(start_index + ADDRS.length()).trim();
    end_index=input.indexOf('\n');
    if(end_index > 0)
      input=input.substring(0, end_index);
    List<String> rsps=Util.parseStringList(input,",");
    for(String tmp: rsps) {
      int index2=tmp.lastIndexOf(':');
      if(index2 != -1)
        tmp=tmp.substring(0, index2);
      retval.add(InetAddress.getByName(tmp));
    }
  }
  return retval;
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

protocol_name=protocol_name.substring(0, index);
String attrs=rest.substring(index +1); // e.g. "num_sent,msgs,num_received_msgs"
list=Util.parseStringList(attrs, ",");

相关文章

Util类方法