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

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

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

StrUtil.toList介绍

[英]Converts a string containing a '\n'-delimited list of elements to a string list.
[中]

代码示例

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

/**
 * Converts a string containing a '\n'-delimited list of elements to a string list.
 * 
 * @param text The string containing the '\n'-delimited elements.
 * @param list The string list that will receive the parsed elements. If null, a new list is
 *            created. If not null, the list is cleared before adding elements.
 * @return A list containing the parsed elements. If the input list was not null, that instance
 *         is returned. Otherwise, a newly created list is returned.
 */
public static List<String> toList(String text, List<String> list) {
  return toList(text, list, LINE_TERMINATOR);
}

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

/**
 * Converts a string containing a delimited list of elements to a string list.
 * 
 * @param text The string containing the delimited elements.
 * @param delimiter The delimiter that separates the elements in the input string.
 * @return A list containing the parsed elements.
 */
public static List<String> toList(String text, String delimiter) {
  return toList(text, null, delimiter);
}

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

/**
 * Converts a string containing a '\n'-delimited list of elements to a string list.
 * 
 * @param text The string containing the '\n'-delimited elements.
 * @return A list containing the parsed elements.
 */
public static List<String> toList(String text) {
  return toList(text, null, LINE_TERMINATOR);
}

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

public int getEntityPriority(String entity) {
  if (StringUtils.isEmpty(entity) || StringUtils.isEmpty(entityList)) {
    return -1;
  }
  
  return StrUtil.toList(entityList, ";").indexOf(entity);
}

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

@Override
public List<String> getValues(String propertyName, String instanceName) {
  return StrUtil.toList(get(propertyName, instanceName));
}

代码示例来源:origin: org.carewebframework/org.carewebframework.cal.ui.reporting

/**
 * Invokes a client-side print request.
 *
 * @param printRoot Root component for printing.
 * @param title Optional title text.
 * @param header Header to print at top of first page.
 * @param styleSheet Style sheet to be applied.
 * @param preview If true, show print preview.
 */
public static void print(Component printRoot, String title, String header, String styleSheet, boolean preview) {
  List<String> content = new ArrayList<String>();
  if (header != null && !header.isEmpty()) {
    content.add("$report_headers $" + header);
  }
  if (title != null && !title.isEmpty()) {
    content.add("<div><div class='cwf-reporting-header-title'>" + StringEscapeUtils.escapeHtml(title)
        + "</div></div>");
  }
  content.add("#" + printRoot.getUuid());
  ZKUtil.printToClient(content, StrUtil.toList(styleSheet, ","), preview);
}

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

@Override
public void onAsyncRPCComplete(AsyncRPCCompleteEvent event) {
  loadSkinTests(StrUtil.toList(event.getData(), "\r"));
}

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

@Override
public void onAsyncRPCComplete(AsyncRPCCompleteEvent event) {
  loadProblems(StrUtil.toList(event.getData(), "\r"));
}

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

public void onAsyncRPCComplete(AsyncRPCCompleteEvent event) {
  List<String> results = toList(event.getData(), null, "\r");
  String error = getError(results);
  
  if (error != null) {
    status(error);
    model.clear();
  } else {
    for (String result : results) {
      T value = parseData(result);
      
      if (value != null) {
        model.add(value);
      }
    }
    
    renderData();
  }
}

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

String original = "1,2,3,4,5";
List<String> strList = StrUtil.toList(original, ",");
assertEquals(5, strList.size());
String str = StrUtil.fromList(strList, ",");
assertEquals(original, str);
strList = StrUtil.toList(",,3,4,5,", ",");
assertEquals(5, strList.size());

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

/**
 * Update the scheduled notification with new input values and send to the server, then close
 * the dialog if successful.
 */
public void onClick$btnOK() {
  if (validate()) {
    notification.setDeliveryDate(new FMDate(dtbDelivery.getDate()));
    notification.setDfn(chkAssociate.isChecked() ? (String) chkAssociate.getValue() : null);
    notification.setPatientName(chkAssociate.isChecked() ? lblPatient.getValue() : null);
    notification.setSubject(txtSubject.getValue());
    notification.setPriority((Priority) cboPriority.getSelectedItem().getValue());
    List<String> message = StrUtil.toList(txtMessage.getText());
    
    if (service.scheduleNotification(notification, message, recipients)) {
      root.setAttribute("notification", notification);
      root.detach();
    } else {
      PromptDialog.showError("@vistanotification.schedule.save.failure");
    }
  }
}

相关文章