@Override protected String apply(String value, Locale locale) { return StringUtils.lowerCase(value, locale); } }
Status(final String description) { assert isNotBlank(description) : "The Status description must be specified!"; this.description = lowerCase(description); }
/** * If the URI has no scheme defined, the default is {@link UriType#FILE} */ private static ResourceDownloader.UriType getURLType(URI value) { String scheme = StringUtils.lowerCase(value.getScheme()); if (scheme == null) return UriType.FILE; if ("file".equals(scheme)) return UriType.FILE; if ("hdfs".equals(scheme)) return UriType.HDFS; if ("ivy".equals(scheme)) return UriType.IVY; return UriType.OTHER; } }
/** * Implements the hashCode for Evidence. * * @return hash code. */ @Override public int hashCode() { return new HashCodeBuilder(MAGIC_HASH_INIT_VALUE, MAGIC_HASH_MULTIPLIER) .append(StringUtils.lowerCase(name)) .append(StringUtils.lowerCase(source)) .append(StringUtils.lowerCase(value)) .append(confidence) .toHashCode(); }
private String _replaceHttpSchemeWithHttps(String url) { String lowerCasedUrl = StringUtils.lowerCase(url); if (lowerCasedUrl.startsWith(HTTP)) { return HTTPS.concat(url.substring(HTTP.length())); } return url; }
/** * Determines whether this Locator launcher command has the specified command-line option. * * @param option a String indicating the name of the command-line option to this command. * @return a boolean value indicating whether this command has the specified named command-line * option. */ public boolean hasOption(final String option) { return getOptions().contains(lowerCase(option)); }
/** * Determines whether this Server launcher command has the specified command-line option. * * @param option a String indicating the name of the command-line option to this command. * @return a boolean value indicating whether this command has the specified named command-line * option. */ public boolean hasOption(final String option) { return getOptions().contains(lowerCase(option)); }
@Test public void testLowerCase() { assertNull(StringUtils.lowerCase(null)); assertNull(StringUtils.lowerCase(null, Locale.ENGLISH)); assertEquals("lowerCase(String) failed", "foo test thing", StringUtils.lowerCase("fOo test THING")); assertEquals("lowerCase(empty-string) failed", "", StringUtils.lowerCase("")); assertEquals("lowerCase(String, Locale) failed", "foo test thing", StringUtils.lowerCase("fOo test THING", Locale.ENGLISH)); assertEquals("lowerCase(empty-string, Locale) failed", "", StringUtils.lowerCase("", Locale.ENGLISH)); }
Request request = new Request(); String[] urlPies = url.split("##"); if (urlPies.length >= 2 && StringUtils.lowerCase(urlPies[1]).equals("post")) { request.setHttpMethod(HttpMethod.POST);
private StringBuilder getBasePathStringBuilder(ClassOrInterfaceTypeDetails controller, ControllerAnnotationValues values) { StringBuilder sbuilder = new StringBuilder("/"); String prefix = StringUtils.trim(values.getPathPrefix()); final JavaType entity = values.getEntity(); // Add prefix if (StringUtils.isNotBlank(prefix)) { if (prefix.startsWith("/")) { sbuilder.append(prefix.substring(1)); } else { sbuilder.append(prefix); } // Include last / if provided prefix doesn't include it if (!prefix.endsWith("/")) { sbuilder.append("/"); } } // add Entity sbuilder.append(StringUtils.lowerCase(getPluralService().getPlural(entity))); return sbuilder; }
private String convertResourceType(String type) { switch (StringUtils.lowerCase(type)) { case "environment": return "stack"; case "project": return "environment"; default: return type; } }
@Override public String canonicalize(final String value, final Locale locale) { return StringUtils.lowerCase(value, locale); } },
pathPrefix = StringUtils.lowerCase(pathPrefix);
@Override public String getMime(final String filename) { if(StringUtils.startsWith(filename, "._")) { return DEFAULT_CONTENT_TYPE; } // Reads from mime.types in classpath return types.getMimetype(StringUtils.lowerCase(filename)); } }
/** * Set the EPerson's email * * @param s the new email */ public void setEmail(String s) { this.email = StringUtils.lowerCase(s); setModified(); }
@Override public boolean accept(Host host) { return StringUtils.lowerCase(BookmarkNameProvider.toString(host)).contains(searchString.toLowerCase(Locale.ROOT)) || ((null != host.getComment()) && StringUtils.lowerCase(host.getComment()).contains(searchString.toLowerCase(Locale.ROOT))) || ((null != host.getCredentials().getUsername()) && StringUtils.lowerCase(host.getCredentials().getUsername()).contains(searchString.toLowerCase(Locale.ROOT))) || StringUtils.lowerCase(host.getHostname()).contains(searchString.toLowerCase(Locale.ROOT)); } });
private JcrPropertySupportingConstructor(ValueFactory valueFactory) { yamlConstructors.put(new Tag("!" + StringUtils.lowerCase(PropertyType.TYPENAME_PATH)), new JcrConstruct(PropertyType.PATH, valueFactory)); yamlConstructors.put(new Tag("!" + StringUtils.lowerCase(PropertyType.TYPENAME_URI)), new JcrConstruct(PropertyType.URI, valueFactory)); yamlConstructors.put(new Tag("!" + StringUtils.lowerCase(PropertyType.TYPENAME_REFERENCE)), new JcrConstruct(PropertyType.REFERENCE, valueFactory)); yamlConstructors.put(new Tag("!" + StringUtils.lowerCase(PropertyType.TYPENAME_WEAKREFERENCE)), new JcrConstruct(PropertyType.WEAKREFERENCE, valueFactory)); yamlConstructors.put(new Tag("!" + StringUtils.lowerCase(PropertyType.TYPENAME_BINARY)), new JcrConstruct(PropertyType.BINARY, valueFactory)); } }
@Override public String get() { return TextUtils.stripAccents(lowerCase(firstName + '.' + lastName + '@' + company.getDomain())).replaceAll(" ", "."); } }
@Override public void fetchEnvironment(final MetaHelperInfo helperInfo, final OutputStream os) { Account env = helperInfo.getAccount(); EnvironmentMetaData data = new EnvironmentMetaData(StringUtils.lowerCase(env.getName()), env.getUuid(), StringUtils.lowerCase(helperInfo.getRegionName())); writeToJson(os, data); }