public static String join(Object[] items, String delimiter) { StringBuilder builder = new StringBuilder(); join(builder, items, delimiter); return builder.toString(); }
public static void addNamelist(Element parentElement, Element namelistHolderElement, VariableList variables) { if (variables == null) return; if (variables.isEmpty()) return; List<String> variableNames = new ArrayList<String>(); for (Entry<String, String> entry : variables) { variableNames.add(entry.getKey()); createVarElement(parentElement, entry.getKey(), entry.getValue()); } namelistHolderElement.setAttribute(NAME_LIST_ATTRIBUTE, StringUtils.join(variableNames, " ")); }
public static String getAllMessages(Throwable throwable) { return join(getAllMessagesAsArray(throwable), "\n"); }
private static Element createSubmitElement(Element parent, VoiceXmlDialogueContext voiceXmlDialogueContext, SubmitMethod method, VoiceXmlOutputTurn outputTurn, String... nameList) { Element submitElement = DomUtils.appendNewElement(parent, SUBMIT_ELEMENT); submitElement.setAttribute(NEXT_ATTRIBUTE, getSubmitPathForTurn(voiceXmlDialogueContext, outputTurn)); submitElement.setAttribute(NAME_LIST_ATTRIBUTE, StringUtils.join(nameList, " ")); submitElement.setAttribute(METHOD_ATTRIBUTE, method.name()); applyDocumentFetchConfiguration(submitElement, voiceXmlDialogueContext); return submitElement; }
Object[] array = (Object[]) propertyValue; insertPropertyName(propertyName, true); StringUtils.join(mBuffer, array, ", "); close(true); } else if (componentType == Boolean.TYPE) { boolean[] array = (boolean[]) propertyValue; insertPropertyName(propertyName, true); StringUtils.join(mBuffer, array, ", "); close(true); } else if (componentType == Character.TYPE) { char[] array = (char[]) propertyValue; insertPropertyName(propertyName, true); StringUtils.join(mBuffer, array, ", "); close(true); } else if (componentType == Double.TYPE) { double[] array = (double[]) propertyValue; insertPropertyName(propertyName, true); StringUtils.join(mBuffer, array, ", "); close(true); } else if (componentType == Float.TYPE) { float[] array = (float[]) propertyValue; insertPropertyName(propertyName, true); StringUtils.join(mBuffer, array, ", "); close(true); } else if (componentType == Long.TYPE) { long[] array = (long[]) propertyValue; insertPropertyName(propertyName, true); StringUtils.join(mBuffer, array, ", "); close(true);
subdialogueElement.setAttribute(NAME_LIST_ATTRIBUTE, StringUtils.join(submitNameList, " "));
objectElement.setAttribute(ARCHIVE_ATTRIBUTE, StringUtils.join(archives, " "));