List of usage examples for org.apache.commons.lang StringUtils equals
public static boolean equals(String str1, String str2)
Compares two Strings, returning true
if they are equal.
From source file:info.magnolia.module.admininterface.trees.TemplateTreeColumnHtmlRenderer.java
private String findTemplateKey(String templateName) { for (Iterator iter = TemplateManager.getInstance().getAvailableTemplates(); iter.hasNext();) { Template template = (Template) iter.next(); if (StringUtils.equals(templateName, template.getName())) { return template.getTitle(); }/*from w ww. j av a2 s. c om*/ } return templateName; }
From source file:com.zb.app.biz.cons.CompanyTypeEnum.java
/** * ?name?/*from w ww .j a va 2 s . c om*/ */ public static CompanyTypeEnum getEnum(String name) { for (CompanyTypeEnum current : values()) { if (StringUtils.equals(current.name, name)) { return current; } } return null; }
From source file:hydrograph.ui.expression.editor.evaluate.FieldNameAndValueCellModifier.java
/** * Returns whether the property can be modified * //from w w w. j a v a2 s.c om * @param element * the element * @param property * the property * @return boolean */ public boolean canModify(Object element, String property) { // Allow editing of all values if (StringUtils.equals(EvalDialogFieldTable.FIELD_VALUE_PROPERTY, property)) return true; else return false; }
From source file:com.daimler.spm.b2bacceleratoraddon.forms.AdvancedSearchForm.java
public boolean isOrderFormSearchResultType() { return StringUtils.equals(searchResultType, "order-form"); }
From source file:jp.co.tis.gsp.tools.db.beans.Erd.java
public DataType getDataType(String name) { for (DataType dataType : dataTypeList) { if (StringUtils.equals(dataType.getName(), name)) return dataType; }/*from w w w.ja v a2 s .c om*/ return null; }
From source file:io.github.jrobotframework.keyword.csv.criteria.ColumnEqualsRestriction.java
@Override public boolean matches(String[] line, Map<String, Integer> headers) { Validate.isTrue(/*from w w w . ja v a 2s . c o m*/ (MapUtils.isNotEmpty(headers) && name != null && headers.containsKey(name)) || index != null, "index or name is invalid."); if (name != null) { index = headers.get(name); } assert index != null; return StringUtils.equals(line[index], value); }
From source file:com.iggroup.oss.restdoclet.doclet.util.ParameterNamePredicate.java
/** * {@inheritDoc}/* w w w. j a v a 2 s. c om*/ */ @Override public boolean evaluate(final Object object) { boolean result; if (object instanceof BaseType && StringUtils.equals(name, ((BaseType) object).getName())) { result = true; } else { result = false; } return result; }
From source file:it.cineca.pst.huborcid.web.filter.StaticResourcesProductionFilter.java
@Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest httpRequest = (HttpServletRequest) request; String contextPath = ((HttpServletRequest) request).getContextPath(); String requestURI = httpRequest.getRequestURI(); requestURI = StringUtils.substringAfter(requestURI, contextPath); if (StringUtils.equals("/", requestURI)) { requestURI = "/index.html"; }//from www . j a v a 2s . c o m String newURI = "/dist" + requestURI; request.getRequestDispatcher(newURI).forward(request, response); }
From source file:com.baidu.rigel.biplatform.tesseract.meta.impl.CallbackServiceImpl.java
@Override public List<CallBackTreeNode> parseFromJson(String jsonStr) { FetchUrlResult fetchUrlResult = AnswerCoreConstant.GSON.fromJson(jsonStr, FetchUrlResult.class); List<CallBackTreeNode> result = null; String oldVersion = "1.0"; if (StringUtils.equals(CALLBACK_VERSION_1, fetchUrlResult.getVersion()) || StringUtils.equals(CALLBACK_VERSION_1, oldVersion)) { CallBackTreeFetchUrlResult posTreeFetchResult = AnswerCoreConstant.GSON.fromJson(jsonStr, CallBackTreeFetchUrlResult.class); result = posTreeFetchResult.getData(); } else {/*from w w w.j ava2 s . c o m*/ // throw new UnsupportedOperationException("no implement yet"); } return result; }
From source file:com.adaptris.core.DefaultAdaptrisMessageImp.java
/** * @see com.adaptris.core.AdaptrisMessage#equivalentForTracking (com.adaptris.core.AdaptrisMessage) *///from ww w . j av a2 s . com @Override public boolean equivalentForTracking(AdaptrisMessage other) { boolean result = false; if (StringUtils.equals(getUniqueId(), other.getUniqueId())) { if (Arrays.equals(getPayload(), other.getPayload())) { if (StringUtils.equals(getContentEncoding(), other.getContentEncoding())) { if (this.getMetadata().equals(other.getMetadata())) { result = true; } } } } return result; }