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


Java StringUtils.lowerCase方法代码示例

本文整理汇总了Java中org.apache.commons.lang3.StringUtils.lowerCase方法的典型用法代码示例。如果您正苦于以下问题:Java StringUtils.lowerCase方法的具体用法?Java StringUtils.lowerCase怎么用?Java StringUtils.lowerCase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.commons.lang3.StringUtils的用法示例。


在下文中一共展示了StringUtils.lowerCase方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildSearchTermQuery

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
/**
 * Returns a {@link BooleanQuery} for the given search text.
 *
 * @param indexType the type in which should be searched.
 * @param search the search text.
 * @param baseBoost highest possible boost of the query. The more the match is exact
 * 			than a bigger boost will be used.
 */
private static BooleanQuery buildSearchTermQuery(final IIndexTypeConf indexType, final String search,
		final float baseBoost) {
	final BooleanQuery subQuery = new BooleanQuery();

	final String lowerCase = StringUtils.lowerCase(search);
	final String capitalized = StringUtils.capitalize(search);

	addSearchTermQueries(indexType, search, subQuery, baseBoost);

	if(!lowerCase.equals(search)) {
		addSearchTermQueries(indexType, lowerCase, subQuery, 0.8f*baseBoost);
	}

	if(!capitalized.equals(search)) {
		addSearchTermQueries(indexType, capitalized, subQuery, 0.8f*baseBoost);
	}

	return subQuery;
}
 
开发者ID:XMBomb,项目名称:InComb,代码行数:28,代码来源:QueryUtil.java

示例2: setSimilarityFields

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
public MltConfig setSimilarityFields(String lang, Collection<String> similarityFields) {
    lang = StringUtils.lowerCase(lang, Locale.ROOT);
    if(CollectionUtils.isEmpty(similarityFields)){
        langSimilarityFields.remove(lang);
    } else {
        Collection<String> langFields = similarityFields.stream()
                .filter(StringUtils::isNoneBlank)
                .collect(Collectors.toCollection(() -> new LinkedHashSet<>()));
        if(CollectionUtils.isNotEmpty(langFields)){
            langSimilarityFields.put(lang, langFields);
        } else {
            langSimilarityFields.remove(lang);
        }
    }
    return this;
}
 
开发者ID:redlink-gmbh,项目名称:smarti,代码行数:17,代码来源:MltConfig.java

示例3: newFillClass

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
public static void newFillClass(Class clz, Map<String, Class<?>> classes,
		Class<? extends Annotation> annotation) {
	try {
		if (annotation == null || clz.getAnnotation(annotation) != null) {
			String table = clz.getSimpleName();
			String key = StringUtils.lowerCase(table);
			
			if (classes.containsKey(key)) {
			}
			
			classes.put(key, clz);
		}
	} catch (Exception e) {
		log.error("class is error,className:"+clz.getName(),e);
	}
}
 
开发者ID:finefuture,项目名称:data-migration,代码行数:17,代码来源:AnnotationScanUtils.java

示例4: processHybrisConfig

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
private void processHybrisConfig(@NotNull final Hybrisconfig hybrisconfig) {
    final List<ExtensionType> extensionTypeList = hybrisconfig.getExtensions().getExtension();
    for (ExtensionType extensionType : extensionTypeList) {
        final String name = StringUtils.lowerCase(extensionType.getName());
        if (name != null) {
            explicitlyDefinedModules.add(name);
            continue;
        }
        final String dir = extensionType.getDir();
        final int indexSlash = dir.lastIndexOf('/');
        final int indexBack = dir.lastIndexOf('\\');
        final int index = Math.max(indexSlash, indexBack);
        if (index == -1) {
            explicitlyDefinedModules.add(StringUtils.lowerCase(dir));
        } else {
            explicitlyDefinedModules.add(StringUtils.lowerCase(dir.substring(index + 1)));
        }
    }
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:20,代码来源:DefaultHybrisProjectDescriptor.java

示例5: PatternModel

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
public PatternModel(Resource resource, String patternsPath, String patternId, String jsonDataFile, String templateName, ResourceResolver resourceResolver) throws IOException {
    this.id = PatternLabUtils.constructPatternId(resource.getPath(), patternsPath, templateName, jsonDataFile);
    this.name = StringUtils.lowerCase(StringUtils.isBlank(jsonDataFile) ? templateName : jsonDataFile);
    this.template = templateName;
    this.path = resource.getPath();
    this.dataPath = StringUtils.isNotBlank(jsonDataFile) ? resource.getParent().getPath() + PatternLabConstants.SLASH + jsonDataFile : StringUtils.EMPTY;
    this.displayed = StringUtils.isBlank(patternId) || StringUtils.startsWith(getId(), patternId);
    this.breadcrumb = Lists.newArrayList(new BreadcrumbItemModel(PatternLabUtils.constructPatternId(resource.getPath(), patternsPath), PatternLabUtils.getResourceTitleOrName(resource)));
    if (StringUtils.isNotBlank(jsonDataFile)) {
        this.breadcrumb.add(new BreadcrumbItemModel(PatternLabUtils.constructPatternId(resource.getPath(), patternsPath, templateName), templateName));
    }
    this.breadcrumb.add(new BreadcrumbItemModel(id, name));
    this.code = PatternLabUtils.getDataFromFile(path, resourceResolver);
    this.data = PatternLabUtils.getDataFromFile(dataPath, resourceResolver);
    this.description = constructDescription(jsonDataFile, templateName, resourceResolver);
    this.embeddedPatterns = Sets.newHashSet();
    this.includingPatterns = Sets.newHashSet();
}
 
开发者ID:deepthinkit,项目名称:patternlab-for-sling,代码行数:19,代码来源:PatternModel.java

示例6: getSimilarityFields

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
public Map.Entry<String,Collection<String>> getSimilarityFields(String lang, boolean fallback) {
    lang = StringUtils.lowerCase(lang, Locale.ROOT);
    Collection<String> langFields = langSimilarityFields.get(lang);
    if(fallback){
        int sepIdx = StringUtils.indexOfAny(lang, '-','_');
        if(sepIdx > 0){
            lang = lang.substring(0, sepIdx);
            langFields = langSimilarityFields.get(lang);
        }
        if(langFields == null && lang != null){
            lang = null;
            langFields = langSimilarityFields.get(lang);
        }
    } //else no fallback
    return langFields == null ? null : new ImmutablePair<>(lang, langFields);
}
 
开发者ID:redlink-gmbh,项目名称:smarti,代码行数:17,代码来源:MltConfig.java

示例7: addDataSourceProfile

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
private void addDataSourceProfile(ConfigurableWebApplicationContext ctx) {
    DataSourceConfigType dataSourceConfigType;
    String rawType = ctx.getEnvironment().getProperty(DATASOURCE_CONFIG_TYPE);
    if(StringUtils.isNotBlank(rawType)) {
        dataSourceConfigType = DataSourceConfigType.valueOf(StringUtils.upperCase(rawType));
    } else {
        dataSourceConfigType = DataSourceConfigType.LEGACY;
    }
    String dataSourceTypeProfile = StringUtils.lowerCase(dataSourceConfigType.name());
    List<String> existingProfiles = Lists.newArrayList(ctx.getEnvironment().getActiveProfiles());
    existingProfiles.add(dataSourceTypeProfile);
    ctx.getEnvironment().setActiveProfiles(existingProfiles.toArray(new String[0]));
}
 
开发者ID:airsonic,项目名称:airsonic,代码行数:14,代码来源:CustomPropertySourceConfigurer.java

示例8: setOrder

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
/**
 * 设置排序方式向.
 * 
 * @param order
 *            可选值为desc或asc,多个排序字段时用','分隔.
 */
public void setOrder(final String order) {
	String lowcaseOrder = StringUtils.lowerCase(order);
	// 检查order字符串的合法值
	String[] orders = StringUtils.split(lowcaseOrder, ',');
	for (String orderStr : orders) {
		if (!StringUtils.equals(DESC, orderStr) && !StringUtils.equals(ASC, orderStr)) {
			throw new IllegalArgumentException("排序方向" + orderStr + "不是合法值");
		}
	}
	this.order = lowcaseOrder;
}
 
开发者ID:yi-jun,项目名称:aaden-pay,代码行数:18,代码来源:Page.java

示例9: filterServerResponseHeader

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
@Override
protected String filterServerResponseHeader(final HttpServletRequest clientRequest, final Response serverResponse, final String headerName,
		final String headerValue) {
	// Filter some headers
	final String lowerCase = StringUtils.lowerCase(headerName);
	return ArrayUtils.contains(INGNORE_HEADERS, lowerCase)
			|| INGORE_HEADER_VALUE.containsKey(lowerCase) && headerValue.startsWith(INGORE_HEADER_VALUE.get(lowerCase)) ? null : headerValue;
}
 
开发者ID:ligoj,项目名称:bootstrap,代码行数:9,代码来源:BackendProxyServlet.java

示例10: setLogin

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
public void setLogin(String login) {
    this.login = StringUtils.lowerCase(login, Locale.ENGLISH);
}
 
开发者ID:michaelhoffmantech,项目名称:patient-portal,代码行数:4,代码来源:User.java

示例11: endElement

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
@Override
public void endElement(final String name, final String elementText) {
    if(null == current) {
        return;
    }
    switch(name) {
        case "object":
            add(current);
            current = null;
            break;
        case "attribute":
            switch(attribute) {
                case "username":
                    current.getCredentials().setUsername(elementText);
                    break;
                case "server":
                    current.setHostname(elementText);
                    break;
                case "protocol":
                    switch(StringUtils.lowerCase(elementText)) {
                        case "webdav":
                            current.setProtocol(protocols.forScheme(Scheme.dav));
                            break;
                        case "webdavs":
                            current.setProtocol(protocols.forScheme(Scheme.davs));
                            break;
                        case "sftp":
                            current.setProtocol(protocols.forScheme(Scheme.sftp));
                            break;
                        case "ftptls":
                        case "ftpssl":
                            current.setProtocol(protocols.forScheme(Scheme.ftps));
                            break;
                        case "ftp":
                            current.setProtocol(protocols.forScheme(Scheme.ftp));
                            break;
                        case "s3":
                            current.setProtocol(protocols.forType(Protocol.Type.s3));
                            break;
                    }
                    // Reset port to default
                    current.setPort(-1);
                    break;
                case "port":
                    final Integer value = Integer.valueOf(elementText);
                    if(value > 0) {
                        current.setPort(value);
                    }
                    break;
                case "nickname":
                    current.setNickname(elementText);
                    break;
                case "initialremotepath":
                    current.setDefaultPath(elementText);
                    break;
            }
    }
}
 
开发者ID:iterate-ch,项目名称:cyberduck,代码行数:59,代码来源:Transmit4BookmarkCollection.java

示例12: Application

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
public Application(final String identifier, final String name) {
    this.identifier = StringUtils.lowerCase(identifier);
    this.name = name;
}
 
开发者ID:iterate-ch,项目名称:cyberduck,代码行数:5,代码来源:Application.java

示例13: toLowerCase

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
public static String toLowerCase(String value) {
    return StringUtils.lowerCase(value, LOCALE);
}
 
开发者ID:snowplow,项目名称:iab-spiders-and-robots-java-client,代码行数:4,代码来源:IabFile.java

示例14: handleSingleStr

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
@Override
protected  String handleSingleStr(String input) {
    return StringUtils.lowerCase(input);
}
 
开发者ID:virjar,项目名称:vscrawler,代码行数:5,代码来源:LowerCase.java

示例15: setOrder

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
/**
 * 设置排序方式向.
 *
 * @param order
 *            可选值为desc或asc,多个排序字段时用','分隔.
 */
public void setOrder(final String order) {
    this.order = StringUtils.lowerCase(order);
}
 
开发者ID:wolfboys,项目名称:opencron,代码行数:10,代码来源:PageBean.java


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