當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。