本文整理匯總了Java中org.apache.commons.lang.StringUtils.remove方法的典型用法代碼示例。如果您正苦於以下問題:Java StringUtils.remove方法的具體用法?Java StringUtils.remove怎麽用?Java StringUtils.remove使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.commons.lang.StringUtils
的用法示例。
在下文中一共展示了StringUtils.remove方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getComputedApplicationId
import org.apache.commons.lang.StringUtils; //導入方法依賴的package包/類
public String getComputedApplicationId() {
String applicationId = this.applicationId;
if ("".equals(applicationId)) {
applicationId = "com.convertigo.mobile." + getProject().getName();
}
else {
// The user can have setup an application ID that could be non valid:
// application ID can only contains alpha numeric ASCII characters.
String[] applicationIdParts = applicationId.split("\\.");
for (int i = 0; i < applicationIdParts.length; i++) {
applicationIdParts[i] = com.twinsoft.convertigo.engine.util.StringUtils.normalize(applicationIdParts[i]);
applicationIdParts[i] = StringUtils.remove(applicationIdParts[i], "_");
}
applicationId = com.twinsoft.convertigo.engine.util.StringUtils.join(applicationIdParts, ".");
}
return applicationId;
}
示例2: loadClassesFromSettingsFolder
import org.apache.commons.lang.StringUtils; //導入方法依賴的package包/類
private void loadClassesFromSettingsFolder() {
Properties properties = new Properties();
IFolder folder=getCurrentProject().getFolder(PathConstant.PROJECT_RESOURCES_FOLDER);
IFile file = folder.getFile(PathConstant.EXPRESSION_EDITOR_EXTERNAL_JARS_PROPERTIES_FILES);
try {
LOGGER.debug("Loading property file");
if (file.getLocation().toFile().exists()) {
FileInputStream inStream = new FileInputStream(file.getLocation().toString());
properties.load(inStream);
for(Object key:properties.keySet()){
String packageName=StringUtils.remove((String)key,Constants.DOT+Constants.ASTERISK);
if(StringUtils.isNotBlank(properties.getProperty((String)key)) && StringUtils.isNotBlank(packageName)){
loadUserDefinedClassesInClassRepo(properties.getProperty((String)key),packageName);
}
}
}
} catch (IOException |RuntimeException exception) {
LOGGER.error("Exception occurred while loading jar files from projects setting folder",exception);
}
}
示例3: getComponentOutputSchemaFromInputPort
import org.apache.commons.lang.StringUtils; //導入方法依賴的package包/類
private ComponentsOutputSchema getComponentOutputSchemaFromInputPort(Component component, String inputPortId) {
inputPortId = StringUtils.remove(inputPortId, Constants.COPY_FROM_INPUT_PORT_PROPERTY);
ComponentsOutputSchema componentsOutputSchema = null;
for (Link link : component.getTargetConnections()) {
if (StringUtils.equalsIgnoreCase(link.getTargetTerminal(), inputPortId)) {
componentsOutputSchema = SchemaPropagation.INSTANCE.getComponentsOutputSchema(link);
}
}
return componentsOutputSchema;
}
示例4: lastString
import org.apache.commons.lang.StringUtils; //導入方法依賴的package包/類
public String lastString(String field, String seperator) {
String result = Constants.EMPTY_STRING;
if (StringUtils.isNotBlank(field)) {
String[] strArray = StringUtils.split(field, seperator);
result = strArray[strArray.length - 1];
if (StringUtils.endsWith(result, Constants.SEMICOLON)) {
result = StringUtils.remove(result, Constants.SEMICOLON);
}
}
return result;
}
示例5: getPortIndex
import org.apache.commons.lang.StringUtils; //導入方法依賴的package包/類
private String getPortIndex(Link link) {
if(StringUtils.startsWithIgnoreCase(link.getSourceTerminal(), Constants.INPUT_SOCKET_TYPE)){
return StringUtils.remove(link.getSourceTerminal(), Constants.INPUT_SOCKET_TYPE);
}else {
return StringUtils.remove(link.getSourceTerminal(), Constants.OUTPUT_SOCKET_TYPE);
}
}
示例6: getPortCount
import org.apache.commons.lang.StringUtils; //導入方法依賴的package包/類
private String getPortCount(String sourceTerminalId) {
String portCount=null;
if(StringUtils.startsWithIgnoreCase(sourceTerminalId, Constants.UNUSED_SOCKET_TYPE)){
portCount=StringUtils.remove(sourceTerminalId, Constants.UNUSED_SOCKET_TYPE);
}else if(StringUtils.startsWithIgnoreCase(sourceTerminalId, Constants.OUTPUT_SOCKET_TYPE)){
portCount=StringUtils.remove(sourceTerminalId, Constants.OUTPUT_SOCKET_TYPE);
}
return portCount;
}
示例7: populateJoinMapDialog
import org.apache.commons.lang.StringUtils; //導入方法依賴的package包/類
private void populateJoinMapDialog() {
if (joinMappingGrid.getLookupMapProperties() != null
&& !joinMappingGrid.getLookupMapProperties().isEmpty()) {
mappingTableItemList = joinMappingGrid.getLookupMapProperties();
} else {
mappingTableItemList = new LinkedList<>();
}
if (joinMappingGrid.getButtonText() != null
&& !StringUtils.equals(joinMappingGrid.getButtonText(), NO_COPY)) {
radioButtonMap.get(joinMappingGrid.getButtonText()).setSelection(
true);
mappingTableViewer.getTable().setEnabled(false);
enableMappingTableButtonPanel(false);
String inputPortID=StringUtils.remove(joinMappingGrid.getButtonText(), Constants.COPY_FROM_INPUT_PORT_PROPERTY);
copyFieldsWhenCopyOfIsSelected(inputPorts.get(Integer.parseInt(StringUtils.remove(inputPortID, Constants.INPUT_SOCKET_TYPE))), inputPortID);
} else {
radioButtonMap.get(NO_COPY).setSelection(true);
}
mappingTableViewer.setInput(mappingTableItemList);
mappingTableViewer.refresh();
populatePreviousItemsOfTable();
mouseDoubleClick();
}
示例8: getPortIndex
import org.apache.commons.lang.StringUtils; //導入方法依賴的package包/類
private String getPortIndex(Link link) {
if(StringUtils.startsWithIgnoreCase(link.getSourceTerminal(), Constants.INPUT_SOCKET_TYPE)){
return StringUtils.remove(link.getSourceTerminal(), Constants.INPUT_SOCKET_TYPE);
}else {
return StringUtils.remove(link.getSourceTerminal(), Constants.OUTPUT_SOCKET_TYPE);
}
}
示例9: checkJDKVersion
import org.apache.commons.lang.StringUtils; //導入方法依賴的package包/類
private static boolean checkJDKVersion(String jdkVersion,boolean showPopupAndExit) {
jdkVersion=StringUtils.removeStart(jdkVersion, "jdk");
jdkVersion =StringUtils.remove(jdkVersion, ".");
jdkVersion=StringUtils.remove(jdkVersion, "_");
long version=Long.parseLong(jdkVersion);
if(version>=REQUIRED_JDK_VERSION){
return true;
}
if(showPopupAndExit){
showInvalidJavaHomeDialogAndExit();
}
return false;
}
示例10: getCurrentGraphName
import org.apache.commons.lang.StringUtils; //導入方法依賴的package包/類
private String getCurrentGraphName()
{
String graphName= PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor().getEditorInput().getName();
graphName = StringUtils.remove(graphName, Constants.JOB_EXTENSION);
graphName = StringUtils.abbreviate(graphName, 20);
return graphName;
}
示例11: getRelativePath
import org.apache.commons.lang.StringUtils; //導入方法依賴的package包/類
/**
* Acquisition relative path
*
* @param baseDir
* @param file
* @return
*/
public static String getRelativePath(File baseDir, File file) {
return StringUtils.remove(file.getAbsolutePath(), baseDir.getAbsolutePath());
}