本文整理汇总了Java中org.apache.commons.lang.StringUtils.equalsIgnoreCase方法的典型用法代码示例。如果您正苦于以下问题:Java StringUtils.equalsIgnoreCase方法的具体用法?Java StringUtils.equalsIgnoreCase怎么用?Java StringUtils.equalsIgnoreCase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.lang.StringUtils
的用法示例。
在下文中一共展示了StringUtils.equalsIgnoreCase方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: adjustOffsetForJump
import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
private long adjustOffsetForJump(long pageNumber, Long numberOfRecords) {
long tempOffset = 0;
tempOffset = offset;
offset = (pageNumber * pageSize) - pageSize;
if (filterCondition!=null && !filterCondition.isEmpty()) {
if (StringUtils.equalsIgnoreCase(FilterHelper.INSTANCE.getRemoteCondition(), " ")) {
if (numberOfRecords != null) {
if (offset >= rowCount) {
offset = rowCount - pageSize;
if (offset < 0) {
offset = 0;
}
}
}
} else {
setOffset(pageNumber);
}
} else {
setOffset(pageNumber);
}
return tempOffset;
}
示例2: enableAndDisableValue2TextBox
import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
private void enableAndDisableValue2TextBox(String condition, Text text) {
if(StringUtils.equalsIgnoreCase(condition,FilterConstants.BETWEEN)
|| StringUtils.equalsIgnoreCase(condition,FilterConstants.BETWEEN_FIELD)){
text.setVisible(true);
} else {
text.setVisible(false);
}
}
示例3: readPieceMd5
import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
@Override
public List<String> readPieceMd5(String taskId, String fileMd5) {
List<String> pieceMd5s = null;
String lockName = lockService.getLockName(LockConstants.FILE_MD5_DATA_LOCK, taskId);
lockService.lock(lockName);
try {
Path path = PathUtil.getMd5DataPath(taskId);
if (Files.exists(path)) {
pieceMd5s = Files.readAllLines(path, StandardCharsets.UTF_8);
}
} catch (Exception e) {
logger.error("read piece md5 error for taskId:{}", taskId, e);
} finally {
lockService.unlock(lockName);
}
if (CollectionUtils.isNotEmpty(pieceMd5s)) {
String sha1Value = pieceMd5s.remove(pieceMd5s.size() - 1);
if (StringUtils.equalsIgnoreCase(sha1Value, DigestUtil.sha1(pieceMd5s)) && !pieceMd5s.isEmpty()) {
String realFileMd5 = pieceMd5s.remove(pieceMd5s.size() - 1);
if (StringUtils.equalsIgnoreCase(realFileMd5, fileMd5)) {
return pieceMd5s;
}
}
}
return null;
}
示例4: showToolTip
import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
private void showToolTip(Text text1, String selectedValue) {
if (StringUtils.equalsIgnoreCase(selectedValue, FilterConstants.IN)
|| StringUtils.equalsIgnoreCase(selectedValue, FilterConstants.NOT_IN)) {
text1.setToolTipText(Messages.COMMA_SEPERATED_VALUE);
} else {
text1.setToolTipText("");
}
}
示例5: newWindowLauncher
import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
public void newWindowLauncher() {
String [] optionList = null;
initialMap = new LinkedHashMap<>(initialMap);
String protocoltext = null;
for(AbstractWidget widget : widgets){
if(widget.getPropertyName().equals(Constants.PROTOCOL_SELECTION)){
FTPProtocolDetails protocolDetails = (FTPProtocolDetails) widget.getProperties().get(Constants.PROTOCOL_SELECTION);
if(protocolDetails!= null){
if(StringUtils.equalsIgnoreCase(protocolDetails.getProtocol(), Constants.AWS_S3)){
protocoltext = protocolDetails.getProtocol();
optionList = new String[]{Constants.GET_FILE_S3, Constants.PUT_FILE_S3};
}else{
protocoltext = protocolDetails.getProtocol();
optionList = new String[]{Constants.GET_FILE, Constants.PUT_FILE};
}
}
}
}
String selectedText = protocoltext;
boolean bol = initialMap.entrySet().stream().anyMatch(val -> val.getValue().getProtocolSelection().equals(selectedText));
if(!bol){
initialMap = new LinkedHashMap<>();
}
FTPOperationConfigDialog authenticationEditorDialog = new FTPOperationConfigDialog(shell,
"", propertyDialogButtonBar, initialMap, cursor, optionList, protocoltext);
authenticationEditorDialog.open();
Map<String, FTPAuthOperationDetails> newValues = authenticationEditorDialog.getOperationParamDetails();
if(isAnyUpdate(initialMap,newValues)){
propertyDialogButtonBar.enableApplyButton(true);
}
initialMap = newValues;
showHideErrorSymbol(widgets);
}
示例6: updateStatusCountForSubjobComponent
import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
private void updateStatusCountForSubjobComponent(ExecutionStatus executionStatus,Component component, boolean isReplay) {
ComponentExecutionStatus status=component.getStatus();
if(status==null || StringUtils.equalsIgnoreCase(ComponentExecutionStatus.BLANK.value(),status.value())){
boolean isPending =applyPendingStatus(component, executionStatus);
if(isPending){
component.updateStatus(ComponentExecutionStatus.PENDING.value());
}
}
if(status!=null && !StringUtils.equalsIgnoreCase(ComponentExecutionStatus.SUCCESSFUL.value(),status.value())){
boolean isRunning =applyRunningStatus(component, executionStatus);
if(isRunning){
component.updateStatus(ComponentExecutionStatus.RUNNING.value());
}
}
boolean isFail =applyFailStatus(component, executionStatus);
if(isFail){
component.updateStatus(ComponentExecutionStatus.FAILED.value());
}
if((status!=null && (StringUtils.equalsIgnoreCase(ComponentExecutionStatus.RUNNING.value(),status.value()) || StringUtils.equalsIgnoreCase(ComponentExecutionStatus.PENDING.value(),status.value()))) || isReplay){
boolean isSuccess=applySuccessStatus(component, executionStatus);
if(isSuccess)
component.updateStatus(ComponentExecutionStatus.SUCCESSFUL.value());
}
}
示例7: getType
import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
public static Type getType(String typeName) {
for (Type type : Type.values()) {
if (StringUtils.equalsIgnoreCase(typeName, type.type)) {
return type;
}
}
return Type.OTHER;
}
示例8: pushSchemaToMapping
import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
/**
* Push the schema from schema tab to Mapping in General tab
*
* @param component
* @param schemaGridRowList
*/
public void pushSchemaToMapping( Component component, List<GridRow> schemaGridRowList) {
if(StringUtils.equalsIgnoreCase(Constants.TRANSFORM, component.getComponentName()) ||
StringUtils.equalsIgnoreCase(Constants.AGGREGATE, component.getComponentName()) ||
StringUtils.equalsIgnoreCase(Constants.NORMALIZE, component.getComponentName())||
StringUtils.equalsIgnoreCase(Constants.GROUP_COMBINE, component.getComponentName())||
StringUtils.equalsIgnoreCase(Constants.CUMULATE, component.getComponentName())){
pushSchemaToTransformMapping(component, schemaGridRowList);
}
else if(StringUtils.equalsIgnoreCase(Constants.LOOKUP, component.getComponentName())){
pushSchemaToLookupMapping( component, schemaGridRowList);
}else if(StringUtils.equalsIgnoreCase(Constants.JOIN, component.getComponentName())){
pushSchemaToJoinMapping( component, schemaGridRowList);
}
}
示例9: sequencingOfSchemaFieldsInOrderOfInternalSchemaFields
import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
private void sequencingOfSchemaFieldsInOrderOfInternalSchemaFields(List<GridRow> outputSchema,
List<GridRow> internalSchema2) {
for(int index=0;index<internalSchema2.size();index++){
if(!StringUtils.equalsIgnoreCase(outputSchema.get(index).getFieldName(), internalSchema2.get(index).getFieldName())){
outputSchema.set(index,internalSchema2.get(index));
}
}
}
示例10: extractContent
import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
protected List<_BridgeMessageContent> extractContent(Part p) throws MessagingException, IOException {
if (p.isMimeType("multipart/*")) {
log.info("Found multipart content, extracting");
List<_BridgeMessageContent> contents = new ArrayList<>();
Multipart mp = (Multipart) p.getContent();
int count = mp.getCount();
for (int i = 0; i < count; i++) {
contents.addAll(extractContent(mp.getBodyPart(i)));
}
return contents;
}
if (p.isMimeType("message/rfc822")) {
log.info("Found nested content, extracting");
return extractContent((Part) p.getContent());
}
String content = p.getContent().toString();
String[] encodings = p.getHeader("Content-Transfer-Encoding");
String encoding = (encodings != null && encodings.length > 0) ? encodings[0] : null;
if (StringUtils.equalsIgnoreCase("quoted-printable", encoding)) {
try {
// TODO actually extract the charset properly
// TODO read RFC to know default charset
log.info("Transfer encoding is {}, decoding", encoding);
content = new String(QuotedPrintableCodec.decodeQuotedPrintable(content.getBytes()));
} catch (DecoderException e) {
log.warn("Content transfer encoding is set to {} but enable to decode: {}", encoding, e.getMessage());
}
}
if (p.isMimeType(MimeTypeUtils.TEXT_PLAIN_VALUE)) {
log.info("Found plain text content");
return Collections.singletonList(new BridgeMessageTextContent(content, encoding));
}
if (p.isMimeType(MimeTypeUtils.TEXT_HTML_VALUE)) {
log.info("Found HTML content");
return Collections.singletonList(new BridgeMessageHtmlContent(content, encoding));
}
return Collections.emptyList();
}
示例11: getOperationOrExpression
import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
private MappingSheetRow getOperationOrExpression(String operationId, TransformMapping transformMapping,
boolean isExpression, String componentName) {
for (MappingSheetRow operationOrExpression : transformMapping.getMappingSheetRows()) {
if (StringUtils.equalsIgnoreCase(operationId, operationOrExpression.getOperationID())) {
return operationOrExpression;
}
}
MappingSheetRow mappingSheetRow = new MappingSheetRow(new ArrayList<FilterProperties>(),
new ArrayList<FilterProperties>(), "", "", false, operationId, new ArrayList<NameValueProperty>(),
isExpression, new ExpressionEditorData("",componentName),
new ExpressionEditorData("", componentName), true);
mappingSheetRow.setAccumulator("");
transformMapping.getMappingSheetRows().add(mappingSheetRow);
return mappingSheetRow;
}
示例12: validationCheckForBigDecimalAndDateDatatype
import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
private void validationCheckForBigDecimalAndDateDatatype(GridRow gridRow, String componentType, TableItem tableItem){
if(StringUtils.equalsIgnoreCase(gridRow.getDataTypeValue(), JAVA_MATH_BIG_DECIMAL)){
validationCheckForBigDecimalDatatype(gridRow, componentType, tableItem);
}else if(StringUtils.equalsIgnoreCase(gridRow.getDataTypeValue(),JAVA_UTIL_DATE)){
validationCheckForDateDatatype(gridRow, tableItem);
}
else{
setBlackColor(tableItem);
}
}
示例13: okPressed
import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
@Override
protected void okPressed() {
FTPAuthOperationDetails authOperationDetails;
String text1Value = "";
String text2Value = "";
if(text1 != null && !text1.isDisposed()){
text1Value = text1.getText();
}
if(text2 != null && !text2.isDisposed()){
text2Value = text2.getText();
}
authOperationSelectionMap = new LinkedHashMap<String, FTPAuthOperationDetails>();
if(authenticationModeCombo.getSelectionIndex() ==1){
if(StringUtils.equalsIgnoreCase(protocolText, "AWS S3 HTTPS")){
authOperationDetails = new FTPAuthOperationDetails(null,
text2Value, null, null, null, protocolText);
}else{
authOperationDetails = new FTPAuthOperationDetails(text1Value,
text2Value, null, null, null, protocolText);
}
}else{
authOperationDetails = new FTPAuthOperationDetails(text1Value,
text2Value, null, null, null, protocolText);
}
authOperationSelectionMap.put(authenticationModeCombo.getText(), authOperationDetails);
super.okPressed();
}
示例14: addIdKeyComposite
import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
/**
* @param container
* @return
*/
private Control addIdKeyComposite(Composite container) {
Composite keyFileComposite = new Composite(container, SWT.BORDER);
keyFileComposite.setLayout(new GridLayout(3, false));
keyFileComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
FTPWidgetUtility ftpWidgetUtility = new FTPWidgetUtility();
if(!StringUtils.equalsIgnoreCase(protocolText, "AWS S3 HTTPS")){
Label userIdLbl = (Label) ftpWidgetUtility.createLabel(keyFileComposite, "User ID");
text1 = (Text) ftpWidgetUtility.createText(keyFileComposite, "", SWT.BORDER);
new Button(keyFileComposite, SWT.NONE).setVisible(false);
}
String label2Text = null;
if(StringUtils.equalsIgnoreCase(protocolText, "AWS S3 HTTPS")){
label2Text = "Porperty File";
}else{
label2Text = "Private Key";
}
Label privateKeyLbl = (Label) ftpWidgetUtility.createLabel(keyFileComposite, label2Text);
setPropertyHelpText(privateKeyLbl, "Used to provide the value for authentication");
privateKeyLbl.setCursor(new Cursor(privateKeyLbl.getDisplay(), SWT.CURSOR_HELP));
text2 = (Text) ftpWidgetUtility.createText(keyFileComposite, "", SWT.BORDER);
Utils.INSTANCE.addMouseMoveListener(text2, cursor);
Button keyFileBrwsBtn = new Button(keyFileComposite, SWT.NONE);
keyFileBrwsBtn.setText("...");
selectionListener(keyFileBrwsBtn, text2);
ControlDecoration text2ControlDecoration = WidgetUtility.addDecorator(text2,Messages.EMPTYFIELDMESSAGE);
FTPWidgetUtility widgetUtility = new FTPWidgetUtility();
if(text1 != null && !text1.isDisposed()){
ControlDecoration text1ControlDecoration = WidgetUtility.addDecorator(text1,Messages.EMPTYFIELDMESSAGE);
widgetUtility.validateWidgetText(text1, propertyDialogButtonBar, cursor, text1ControlDecoration);
}
widgetUtility.validateEmptyWidgetText(text2, propertyDialogButtonBar, cursor, text2ControlDecoration);
if(text1!=null){
addModifyListener(text1);
}
addModifyListener(text2);
return keyFileComposite;
}
示例15: addBasicAuthenticationComposite
import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
/**
* @param container
* @return
*/
private Control addBasicAuthenticationComposite(Composite container) {
Composite basicAuthComposite = new Composite(container, SWT.BORDER);
basicAuthComposite.setLayout(new GridLayout(2, false));
basicAuthComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
String label1Text = null;
String label2Text = null;
int textStyle = 0;
if(StringUtils.equalsIgnoreCase(protocolText, "AWS S3 HTTPS")){
label1Text = "Access Key ID";
label2Text = "Secret Access Key";
textStyle = SWT.BORDER;
}else{
label1Text = "User ID";
label2Text = "Password";
textStyle = SWT.PASSWORD | SWT.BORDER;
}
FTPWidgetUtility ftpWidgetUtility = new FTPWidgetUtility();
Label label1 = (Label) ftpWidgetUtility.createLabel(basicAuthComposite, label1Text);
setPropertyHelpText(label1, "Used to provide the value for authentication");
text1 = (Text) ftpWidgetUtility.createText(basicAuthComposite, "", SWT.BORDER);
Utils.INSTANCE.addMouseMoveListener(text1, cursor);
Label label2 = (Label) ftpWidgetUtility.createLabel(basicAuthComposite, label2Text);
setPropertyHelpText(label2, "Used to provide the value for authentication");
text2 = (Text) ftpWidgetUtility.createText(basicAuthComposite, "", textStyle);
Utils.INSTANCE.addMouseMoveListener(text2, cursor);
ControlDecoration text1ControlDecoration = WidgetUtility.addDecorator(text1,Messages.EMPTYFIELDMESSAGE);
ControlDecoration text2ControlDecoration = WidgetUtility.addDecorator(text2,Messages.EMPTYFIELDMESSAGE);
FTPWidgetUtility widgetUtility = new FTPWidgetUtility();
widgetUtility.validateWidgetText(text1, propertyDialogButtonBar, cursor, text1ControlDecoration);
widgetUtility.validateEmptyWidgetText(text2, propertyDialogButtonBar, cursor, text2ControlDecoration);
addModifyListener(text1);
addModifyListener(text2);
return basicAuthComposite;
}