List of usage examples for org.apache.commons.lang3 StringUtils equals
public static boolean equals(final CharSequence cs1, final CharSequence cs2)
Compares two CharSequences, returning true if they represent equal sequences of characters.
null s are handled without exceptions.
From source file:com.anrisoftware.sscontrol.security.clamav.linux.DurationAttributeRenderer.java
@Override public String toString(Object o, String formatString, Locale locale) { if (StringUtils.equals(formatString, "seconds")) { return Long.toString(((Duration) o).getStandardSeconds()); }/*from w w w . ja va2s . c o m*/ return Long.toString(((Duration) o).getStandardSeconds()); }
From source file:com.anrisoftware.sscontrol.httpd.apache.apache.apache_2_2.LogLevelAttributeRenderer.java
@Override public String toString(Object o, String formatString, Locale locale) { if (!StringUtils.equals(formatString, "loglevel")) { return String.valueOf(o); }//w w w . j ava 2 s .c o m int number = ((Number) o).intValue(); switch (number) { case 0: return "emerg"; case 1: return "alert"; case 2: return "crit"; case 3: return "error"; case 4: return "warn"; case 5: return "notice"; case 6: return "info"; default: return "debug"; } }
From source file:com.quancheng.saluki.core.grpc.router.internal.ScriptRouter.java
public ScriptRouter(String type, String rule) { super(rule);//w w w. java 2 s . com engine = new ScriptEngineManager().getEngineByName(type); if (engine == null && StringUtils.equals(type, "javascript")) { engine = new ScriptEngineManager().getEngineByName("js"); } if (engine == null) { throw new IllegalStateException("Unsupported route rule type: " + type + ", rule: " + rule); } }
From source file:de.micromata.genome.gwiki.web.tags.GWikiHtmlSelectTag.java
public boolean hasValue(String value) { return StringUtils.equals(this.value, value); }
From source file:com.anrisoftware.sscontrol.httpd.citadel.nginx_ubuntu_14_04.TimeoutDurationAttributeRenderer.java
@Override public String toString(Object o, String formatString, Locale locale) { if (StringUtils.equals(formatString, "seconds")) { return toStringSeconds((Duration) o); } else {/*from ww w. j a v a2s .c om*/ return o.toString(); } }
From source file:io.wcm.handler.link.type.AbstractLinkType.java
@Override public boolean accepts(LinkRequest linkRequest) { ValueMap props = linkRequest.getResourceProperties(); // check for matching link type ID in link resource String linkTypeId = props.get(LinkNameConstants.PN_LINK_TYPE, String.class); if (StringUtils.isNotEmpty(linkTypeId)) { return StringUtils.equals(linkTypeId, getId()); }//from www. j a va2s . c o m // if not link type is set at all check if link ref attribute contains a valid link else { String linkRef = props.get(getPrimaryLinkRefProperty(), String.class); return accepts(linkRef); } }
From source file:kenh.expl.functions.Equals.java
public boolean process(String s1, String s2, boolean ignoreCase) { if (ignoreCase) return StringUtils.equalsIgnoreCase(s1, s2); else//from ww w . ja va2 s . c o m return StringUtils.equals(s1, s2); }
From source file:com.github.rvesse.airline.utils.predicates.restrictions.MutuallyExclusiveWithFinder.java
@Override public boolean evaluate(OptionRestriction restriction) { if (restriction instanceof MutuallyExclusiveRestriction) { if (tag == null) return true; return StringUtils.equals(tag, ((MutuallyExclusiveRestriction) restriction).getTag()); }//from w ww.j a va 2s . c o m return false; }
From source file:de.micromata.genome.gwiki.page.impl.wiki.fragment.GWikiFragmentList.java
public boolean sameType(GWikiFragmentList other) { return StringUtils.equals(this.listTag, other.listTag); }
From source file:com.yqboots.web.thymeleaf.support.AbstractHtmlOptionsResolver.java
/** * {@inheritDoc}/*from w w w . j ava 2s . co m*/ */ @Override public boolean supports(final String name) { return StringUtils.equals(this.name, name); }