org.carewebframework.common.StrUtil.split()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(8.4k)|赞(0)|评价(0)|浏览(119)

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

StrUtil.split介绍

[英]Splits a string using the specified delimiter.
[中]使用指定的分隔符拆分字符串。

代码示例

代码示例来源:origin: org.carewebframework/org.carewebframework.common

/**
 * Splits a string using the specified delimiter.
 * 
 * @param text The string to split.
 * @param delimiter The delimiter for the split operation.
 * @return A string array containing the split values. The returned array is guaranteed not to
 *         contain null values by replacing every occurrence of a null value with an empty
 *         string.
 */
public static String[] split(String text, String delimiter) {
  return split(text, delimiter, 0);
}

代码示例来源:origin: org.carewebframework/org.carewebframework.common

/**
 * Splits a string using the specified delimiter.
 * 
 * @param text The string to split.
 * @param delimiter The delimiter for the split operation.
 * @param count Specifies a minimum number of elements to be returned. If the result of the
 *            split operation results in fewer elements, the returned array is expanded to
 *            contain the minimum number of elements.
 * @return A string array containing the split values. The returned array is guaranteed not to
 *         contain null values by replacing every occurrence of a null value with an empty
 *         string.
 */
public static String[] split(String text, String delimiter, int count) {
  return split(text, delimiter, count, true);
}

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.alerts

@Override
protected void render(String dao, List<Object> columns) {
  String pcs[] = split(dao, U, 2);
  
  if (!pcs[0].isEmpty()) {
    columns.add(pcs[1]);
  }
}

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.consultorders

@Override
protected void render(String dao, List<Object> columns) {
  String pcs[] = split(dao, U, 4);
  columns.add(pcs[1]);
  columns.add(pcs[2]);
  columns.add(pcs[3]);
}

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.api.core

public void setString(String value) {
  String[] pcs = StrUtil.split(value, ";", 4);
  location = pcs[0];
  visitDate = FMDate.fromString(pcs[1]);
  serviceCat = pcs[2];
  id = pcs[3];
}

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.crises

@Override
protected void render(String dao, List<Object> columns) {
  String pcs[] = split(dao, U, 5);
  columns.add(pcs[2]);
  columns.add(VistAUtil.normalizeDate(pcs[4]));
}

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.api.notification

/**
 * Creates a recipient based on raw data.
 *
 * @param data Raw data.
 * @param isGroup If true, the raw data represents a group. If false, the type of recipient is
 *            to be inferred from the raw data.
 */
public Recipient(String data, boolean isGroup) {
  String[] pcs = StrUtil.split(data, StrUtil.U, 2);
  long val = NumberUtils.toLong(pcs[0]);
  this.ien = isGroup && val > 0 ? -val : val;
  this.name = pcs[1];
}

代码示例来源:origin: org.carewebframework/org.carewebframework.common

public Version(String value) {
  if (value != null && !value.isEmpty()) {
    String[] pcs = StrUtil.split(value, ".", 4);
    
    for (int i = 0; i < 4; i++) {
      seq[i] = StrUtil.extractInt(pcs[i]);
    }
  }
}

代码示例来源:origin: org.carewebframework/org.carewebframework.rpms.ui.core

private ColumnControl(String value) {
  String[] pcs = StrUtil.split(value, ":", 5);
  label = pcs[0];
  visible = !"1".equals(pcs[1]);
  piece = NumberUtils.toInt(pcs[2]);
  width = pcs[4].isEmpty() ? "60" : pcs[3];
  capitalize = "1".equals(pcs[4]);
}

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.laborders

@Override
protected void render(String dao, List<Object> columns) {
  String pcs[] = split(dao, U, 4);
  columns.add(pcs[1]);
  columns.add(pcs[3]);
  columns.add(VistAUtil.normalizeDate(pcs[2]));
}

代码示例来源:origin: org.carewebframework/org.carewebframework.rpms.ui.visits

@Override
protected void render(String dao, List<Object> columns) {
  String pcs[] = split(dao, U, 4);
  
  if (!pcs[0].isEmpty()) {
    columns.add(pcs[1]);
    columns.add(VistAUtil.normalizeDate(pcs[2]));
    columns.add(pcs[3]);
  }
}

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.allergies

@Override
protected void render(String dao, List<Object> columns) {
  String[] pcs = split(dao, U, 6);
  
  if (pcs[0].isEmpty()) {
    statusADR = pcs[1];
    return;
  }
  String stat = pcs[5];
  boolean canSign = "1".equals(pcs[4]);
  
  if ("U".equals(stat) && !canSign) {
    return;
  }
  
  columns.add(pcs[1]);
  columns.add(pcs[3]);
  columns.add((canSign ? "*" : "") + formatStatus(stat));
}

代码示例来源:origin: org.carewebframework/org.carewebframework.rpms.ui.medlist

@Override
protected void render(String dao, List<Object> columns) {
  String[] pcs = split(dao, U, 15);
  
  if (checkStatus(pcs[8]) && checkInOut(pcs[0])) {
    columns.add(pcs[1]);
    columns.add(pcs[8]);
    columns.add(pcs[14]);
  }
}

代码示例来源:origin: org.carewebframework/org.carewebframework.rpms.ui.patiented

@Override
protected void render(String dao, List<Object> columns) {
  String pcs[] = split(dao, U, 18);
  columns.add(pcs[0]); // Topic name
  columns.add(VistAUtil.normalizeDate(pcs[25])); // Entry date
  columns.add(pcs[2]); // Level
  columns.add(pcs[3]); // Provider name
  columns.add(pcs[4]); // Group / individual
  columns.add(pcs[8]); // Topic category
  String code = pcs[6]; // CPT code
  String icd = pcs[24]; // ICD code
  
  if (!icd.isEmpty()) {
    code = code + (code.isEmpty() ? "" : ", ") + icd;
  }
  
  columns.add(code); // CPT/ICD code
}

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.api.documents

public List<DocumentCategory> getCategories() {
  List<DocumentCategory> categories = new ArrayList<DocumentCategory>();
  
  for (String result : broker.callRPCList("RGUTRPC FILGET", null, 8925.1, null, null, "I $P(^(0),U,4)=\"CL\"")) {
    String[] pcs = StrUtil.split(result, StrUtil.U);
    DocumentCategory cat = new DocumentCategory(pcs[0]);
    cat.setName(pcs[1]);
    categories.add(cat);
  }
  
  Collections.sort(categories);
  return categories;
}

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.vitals

private void plotRange(double xLow, double xHigh, String range) {
  final String pcs[] = StrUtil.split(range, "-", 2);
  
  for (int i = 0; i < 2; i++) {
    String seriesName = rangeSeries[i];
    Series series = findSeries(seriesName, true);
    DataPoint low = plotData(xLow, pcs[i], seriesName, null);
    DataPoint high = plotData(xHigh, pcs[i], seriesName, null);
    
    if (low == null || high == null) {
      chart.options.series.remove(series);
    } else {
      series.plotOptions.dashStyle = DashStyle.Dot;
      series.plotOptions.color = "darkgray";
      series.plotOptions.showInLegend = false;
      low.marker.enabled = false;
      high.marker.enabled = false;
    }
  }
}

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.api.notification

/**
 * Create a scheduled notification from raw data.
 * 
 * @param data Format is <code>
 *  1      2         3            4         5
 * IEN ^ Date ^ Patient Name ^ Subject ^ Extra Info
 * </code>
 */
public ScheduledNotification(String data) {
  String[] pcs = StrUtil.split(data, U, 5);
  setIen(Long.parseLong(pcs[0]));
  setDeliveryDate(FMDate.fromString(pcs[1]));
  setPatientName(pcs[2]);
  setSubject(pcs[3]);
  setExtraInfo(Arrays.copyOfRange(pcs, 4, pcs.length));
}

代码示例来源:origin: org.carewebframework/org.carewebframework.rpms.ui.problem

public void onClick$btnICD() {
  String result = ICDLookupController.execute(txtICD.getText());
  
  if (result != null) {
    String pcs[] = StrUtil.split(result, StrUtil.U, 3);
    icd = new CodingProxy(pcs[0], "ICD9", pcs[1], pcs[2]);
    txtICD.setValue(pcs[2]);
  }
}

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.security.base

public SecurityDomainLoader(BrokerSession brokerSession) {
  List<String> results = brokerSession.callRPCList("RGNETBRP DIVGET", null);
  String preLoginMessage = StringUtils.collectionToDelimitedString(brokerSession.getPreLoginMessage(), "\n");
  String defaultDomain = null;
  
  for (String result : results) {
    String[] pcs = StrUtil.split(result, StrUtil.U, 4);
    
    if (defaultDomain == null) {
      defaultDomain = pcs[0];
    } else {
      SecurityDomain securityDomain = new SecurityDomain(pcs[1], pcs[0]);
      securityDomain.setAttribute(Constants.PROP_LOGIN_INFO, preLoginMessage);
      SecurityDomainRegistry.registerSecurityDomain(securityDomain);
      
      if (pcs[0].equals(defaultDomain)) {
        securityDomain.setAttribute("default", "true");
      }
    }
  }
  
  brokerSession.disconnect();
}

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.encounter

/**
 * Wire variables and events.
 */
@Override
public void doAfterCompose(Component comp) throws Exception {
  super.doAfterCompose(comp);
  
  for (CodeableConceptDt cat : EncounterUtil.getServiceCategories()) {
    CodingDt coding = cat.getCodingFirstRep();
    Comboitem item = cboServiceCategory.appendItem(coding.getDisplay());
    item.setValue(coding.getCode());
    item.setTooltiptext(cat.getText());
  }
  
  List<String> data = broker.callRPCList("RGCWENCX CLINLOC", null, "", 1, 9999);
  
  for (String itm : data) {
    String[] pcs = StrUtil.split(itm, StrUtil.U, 3);
    Listitem item = lstLocation.appendItem(pcs[1], pcs[0]);
    item.setAttribute("sc", pcs[2]);
  }
  
}

相关文章