当前位置: 首页>>代码示例>>Java>>正文


Java StringUtils.collectionToDelimitedString方法代码示例

本文整理汇总了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;
	}
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-skipper,代码行数:21,代码来源:InteractiveModeApplicationRunner.java

示例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, ".");
}
 
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:13,代码来源:SimpleMetadataUIInfo.java

示例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, ".");
}
 
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:13,代码来源:SimpleMetadataUIInfo.java

示例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, ", "));
	}
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:32,代码来源:GenericFilterBean.java

示例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;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:40,代码来源:BeanWrapperImpl.java

示例6: collectionToString

import org.springframework.util.StringUtils; //导入方法依赖的package包/类
private String collectionToString(Collection<? extends CharSequence> collection) {
    return StringUtils.collectionToDelimitedString(collection, separator);
}
 
开发者ID:jopache,项目名称:Settings,代码行数:4,代码来源:ApiClient.java

示例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, ".");
}
 
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:10,代码来源:SimpleMetadataUIInfo.java

示例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, ".");
}
 
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:10,代码来源:SimpleMetadataUIInfo.java


注:本文中的org.springframework.util.StringUtils.collectionToDelimitedString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。