本文整理汇总了Java中org.springframework.util.StringUtils.collectionToDelimitedString方法的典型用法代码示例。如果您正苦于以下问题:Java StringUtils.collectionToDelimitedString方法的具体用法?Java StringUtils.collectionToDelimitedString怎么用?Java StringUtils.collectionToDelimitedString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.util.StringUtils
的用法示例。
在下文中一共展示了StringUtils.collectionToDelimitedString方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readInput
import org.springframework.util.StringUtils; //导入方法依赖的package包/类
@Override
public Input readInput() {
if (!done) {
done = true;
return new Input() {
@Override
public List<String> words() {
return commands;
}
@Override
public String rawText() {
return StringUtils.collectionToDelimitedString(commands, " ");
}
};
}
else {
return null;
}
}
示例2: getDisplayName
import org.springframework.util.StringUtils; //导入方法依赖的package包/类
/**
* Gets display name.
*
* @return the display name
*/
public String getDisplayName() {
final Collection<String> items = getDisplayNames();
if (items.isEmpty()) {
return this.registeredService.getName();
}
return StringUtils.collectionToDelimitedString(items, ".");
}
示例3: getDescription
import org.springframework.util.StringUtils; //导入方法依赖的package包/类
/**
* Gets description.
*
* @return the description
*/
public String getDescription() {
final Collection<String> items = getDescriptions();
if (items.isEmpty()) {
return this.registeredService.getDescription();
}
return StringUtils.collectionToDelimitedString(items, ".");
}
示例4: FilterConfigPropertyValues
import org.springframework.util.StringUtils; //导入方法依赖的package包/类
/**
* Create new FilterConfigPropertyValues.
* @param config FilterConfig we'll use to take PropertyValues from
* @param requiredProperties set of property names we need, where
* we can't accept default values
* @throws ServletException if any required properties are missing
*/
public FilterConfigPropertyValues(FilterConfig config, Set<String> requiredProperties)
throws ServletException {
Set<String> missingProps = (requiredProperties != null && !requiredProperties.isEmpty()) ?
new HashSet<String>(requiredProperties) : null;
Enumeration<?> en = config.getInitParameterNames();
while (en.hasMoreElements()) {
String property = (String) en.nextElement();
Object value = config.getInitParameter(property);
addPropertyValue(new PropertyValue(property, value));
if (missingProps != null) {
missingProps.remove(property);
}
}
// Fail if we are still missing properties.
if (missingProps != null && missingProps.size() > 0) {
throw new ServletException(
"Initialization from FilterConfig for filter '" + config.getFilterName() +
"' failed; the following required properties were missing: " +
StringUtils.collectionToDelimitedString(missingProps, ", "));
}
}
示例5: getPropertyNameTokens
import org.springframework.util.StringUtils; //导入方法依赖的package包/类
/**
* Parse the given property name into the corresponding property name tokens.
* @param propertyName the property name to parse
* @return representation of the parsed property tokens
*/
private PropertyTokenHolder getPropertyNameTokens(String propertyName) {
PropertyTokenHolder tokens = new PropertyTokenHolder();
String actualName = null;
List<String> keys = new ArrayList<String>(2);
int searchIndex = 0;
while (searchIndex != -1) {
int keyStart = propertyName.indexOf(PROPERTY_KEY_PREFIX, searchIndex);
searchIndex = -1;
if (keyStart != -1) {
int keyEnd = propertyName.indexOf(PROPERTY_KEY_SUFFIX, keyStart + PROPERTY_KEY_PREFIX.length());
if (keyEnd != -1) {
if (actualName == null) {
actualName = propertyName.substring(0, keyStart);
}
String key = propertyName.substring(keyStart + PROPERTY_KEY_PREFIX.length(), keyEnd);
if ((key.startsWith("'") && key.endsWith("'")) || (key.startsWith("\"") && key.endsWith("\""))) {
key = key.substring(1, key.length() - 1);
}
keys.add(key);
searchIndex = keyEnd + PROPERTY_KEY_SUFFIX.length();
}
}
}
tokens.actualName = (actualName != null ? actualName : propertyName);
tokens.canonicalName = tokens.actualName;
if (!keys.isEmpty()) {
tokens.canonicalName +=
PROPERTY_KEY_PREFIX +
StringUtils.collectionToDelimitedString(keys, PROPERTY_KEY_SUFFIX + PROPERTY_KEY_PREFIX) +
PROPERTY_KEY_SUFFIX;
tokens.keys = StringUtils.toStringArray(keys);
}
return tokens;
}
示例6: collectionToString
import org.springframework.util.StringUtils; //导入方法依赖的package包/类
private String collectionToString(Collection<? extends CharSequence> collection) {
return StringUtils.collectionToDelimitedString(collection, separator);
}
示例7: getInformationURL
import org.springframework.util.StringUtils; //导入方法依赖的package包/类
/**
* Gets information uRL.
*
* @return the information uRL
*/
public String getInformationURL() {
final Collection<String> items = getInformationURLs();
return StringUtils.collectionToDelimitedString(items, ".");
}
示例8: getPrivacyStatementURL
import org.springframework.util.StringUtils; //导入方法依赖的package包/类
/**
* Gets privacy statement uRL.
*
* @return the privacy statement uRL
*/
public String getPrivacyStatementURL() {
final Collection<String> items = getPrivacyStatementURLs();
return StringUtils.collectionToDelimitedString(items, ".");
}