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


Java Utils.replaceAll方法代码示例

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


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

示例1: cleanStopName

import org.mtransit.parser.Utils; //导入方法依赖的package包/类
@Override
public String cleanStopName(String stopName) {
	stopName = CLEAN_SUBWAY.matcher(stopName).replaceAll(CLEAN_SUBWAY_REPLACEMENT);
	stopName = CLEAN_SUBWAY2.matcher(stopName).replaceAll(CLEAN_SUBWAY2_REPLACEMENT);
	stopName = CleanUtils.cleanSlashes(stopName);
	stopName = Utils.replaceAll(stopName.trim(), START_WITH_ST, StringUtils.EMPTY);
	stopName = Utils.replaceAll(stopName, SPACE_ST, CleanUtils.SPACE);
	stopName = CleanUtils.cleanLabelFR(stopName);
	StringBuilder resultSB = new StringBuilder();
	String[] words = stopName.split(SLASH);
	for (String word : words) {
		if (!resultSB.toString().contains(word.trim())) {
			if (resultSB.length() > 0) {
				resultSB.append(SPACE).append(SLASH).append(SPACE);
			}
			resultSB.append(word.trim());
		}
	}
	return resultSB.toString();
}
 
开发者ID:mtransitapps,项目名称:ca-montreal-stm-bus-parser,代码行数:21,代码来源:MontrealSTMBusAgencyTools.java

示例2: cleanStopName

import org.mtransit.parser.Utils; //导入方法依赖的package包/类
@Override
public String cleanStopName(String gStopName) {
	gStopName = Utils.replaceAll(gStopName, START_WITH_FACES, CleanUtils.SPACE);
	gStopName = Utils.replaceAll(gStopName, SPACE_FACES, CleanUtils.SPACE);
	gStopName = CleanUtils.cleanStreetTypesFRCA(gStopName);
	return CleanUtils.cleanLabelFR(gStopName);
}
 
开发者ID:mtransitapps,项目名称:ca-sorel-varennes-citsv-bus-parser,代码行数:8,代码来源:SorelVarennesCITSVBusAgencyTools.java

示例3: cleanStopName

import org.mtransit.parser.Utils; //导入方法依赖的package包/类
@Override
public String cleanStopName(String gStopName) {
	gStopName = AVENUE.matcher(gStopName).replaceAll(AVENUE_REPLACEMENT);
	gStopName = Utils.replaceAll(gStopName, START_WITH_FACES, CleanUtils.SPACE);
	gStopName = Utils.replaceAll(gStopName, SPACE_FACES, CleanUtils.SPACE);
	return CleanUtils.cleanLabelFR(gStopName);
}
 
开发者ID:mtransitapps,项目名称:ca-le-richelain-citlr-bus-parser,代码行数:8,代码来源:LeRichelainCITLRBusAgencyTools.java

示例4: cleanStopName

import org.mtransit.parser.Utils; //导入方法依赖的package包/类
@Override
public String cleanStopName(String gStopName) {
	gStopName = AVENUE.matcher(gStopName).replaceAll(AVENUE_REPLACEMENT);
	gStopName = Utils.replaceAll(gStopName, START_WITH_FACES, CleanUtils.SPACE);
	gStopName = Utils.replaceAll(gStopName, SPACE_FACES, CleanUtils.SPACE);
	gStopName = CleanUtils.cleanStreetTypesFRCA(gStopName);
	return CleanUtils.cleanLabelFR(gStopName);
}
 
开发者ID:mtransitapps,项目名称:ca-les-moulins-mrclm-bus-parser,代码行数:9,代码来源:LesMoulinsMRCLMBusAgencyTools.java

示例5: cleanStopName

import org.mtransit.parser.Utils; //导入方法依赖的package包/类
@Override
public String cleanStopName(String gStopName) {
	gStopName = REMOVE_STOP_CODE_STOP_NAME.matcher(gStopName).replaceAll(StringUtils.EMPTY);
	gStopName = CleanUtils.cleanSlashes(gStopName);
	gStopName = Utils.replaceAll(gStopName, START_WITH_FACES, CleanUtils.SPACE);
	gStopName = Utils.replaceAll(gStopName, SPACE_FACES, CleanUtils.SPACE);
	return CleanUtils.cleanLabelFR(gStopName);
}
 
开发者ID:mtransitapps,项目名称:ca-laval-stl-bus-parser,代码行数:9,代码来源:LavalSTLBusAgencyTools.java

示例6: cleanRouteLongName

import org.mtransit.parser.Utils; //导入方法依赖的package包/类
private String cleanRouteLongName(String result) {
	result = P1NUITP2.matcher(result).replaceAll(StringUtils.EMPTY);
	result = EXPRESS.matcher(result).replaceAll(EXPRESS_REPLACEMENT);
	result = NAVETTE.matcher(result).replaceAll(NAVETTE_REPLACEMENT);
	result = Utils.replaceAll(result.trim(), START_WITH_ST, StringUtils.EMPTY);
	result = Utils.replaceAll(result, SPACE_ST, CleanUtils.SPACE);
	return CleanUtils.cleanLabelFR(result);
}
 
开发者ID:mtransitapps,项目名称:ca-montreal-stm-bus-parser,代码行数:9,代码来源:MontrealSTMBusAgencyTools.java

示例7: cleanTripHeadsign

import org.mtransit.parser.Utils; //导入方法依赖的package包/类
@Override
public String cleanTripHeadsign(String tripHeadsign) {
	tripHeadsign = CleanUtils.cleanSlashes(tripHeadsign);
	tripHeadsign = Utils.replaceAll(tripHeadsign, CleanUtils.SPACE_CHARS, CleanUtils.SPACE);
	tripHeadsign = TERMINUS.matcher(tripHeadsign).replaceAll(CleanUtils.SPACE);
	tripHeadsign = SECTEUR.matcher(tripHeadsign).replaceAll(CleanUtils.SPACE);
	tripHeadsign = SECTEURS.matcher(tripHeadsign).replaceAll(CleanUtils.SPACE);
	tripHeadsign = INDUSTRIEL.matcher(tripHeadsign).replaceAll(INDUSTRIEL_REPLACEMENT);
	tripHeadsign = INDUSTRIELS.matcher(tripHeadsign).replaceAll(INDUSTRIELS_REPLACEMENT);
	tripHeadsign = Utils.replaceAll(tripHeadsign, CleanUtils.SPACE_ST, CleanUtils.SPACE);
	tripHeadsign = CleanUtils.cleanStreetTypesFRCA(tripHeadsign);
	return CleanUtils.cleanLabelFR(tripHeadsign);
}
 
开发者ID:mtransitapps,项目名称:ca-longueuil-rtl-bus-parser,代码行数:14,代码来源:LongueuilRTLBusAgencyTools.java


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