List of usage examples for java.util Locale ROOT
Locale ROOT
To view the source code for java.util Locale ROOT.
Click Source Link
From source file:com.gargoylesoftware.htmlunit.activex.javascript.msxml.MSXMLActiveXObjectFactory.java
/** * Indicates if the ActiveX name is one flavor of XSLTemplate. * @param name the ActiveX name// w w w . j a v a 2 s . c o m * @return {@code true} if this is an XSLTemplate */ static boolean isXSLTemplate(String name) { if (name == null) { return false; } name = name.toLowerCase(Locale.ROOT); return name.startsWith("msxml2.xsltemplate"); }
From source file:io.crate.metadata.PartitionName.java
/** * decodes an encoded ident into it's values *//*from w w w .j av a 2 s.co m*/ @Nullable public static List<BytesRef> decodeIdent(@Nullable String ident) { if (ident == null) { return ImmutableList.of(); } byte[] inputBytes = BASE32.decode(ident.toUpperCase(Locale.ROOT)); try (StreamInput in = StreamInput.wrap(inputBytes)) { int size = in.readVInt(); List<BytesRef> values = new ArrayList<>(size); for (int i = 0; i < size; i++) { values.add(StringType.INSTANCE.streamer().readValueFrom(in)); } return values; } catch (IOException e) { throw new IllegalArgumentException(String.format(Locale.ENGLISH, "Invalid partition ident: %s", ident), e); } }
From source file:com.actionbarsherlock.internal.widget.CapitalizingButton.java
public void setTextCompat(CharSequence text) { if (SANS_ICE_CREAM && mAllCaps && text != null) { if (IS_GINGERBREAD) { setText(text.toString().toUpperCase(Locale.ROOT)); } else {//from ww w . j a v a 2 s. c o m setText(text.toString().toUpperCase()); } } else { setText(text); } }
From source file:br.ufrj.ppgi.jemf.mobile.bean.Equipment.java
/** * Set the status as String value.//from w ww . j av a 2s.c o m * @param status */ public void setStatusString(String status) { setStatus(EnumResourceStatus.valueOf(status.toUpperCase(Locale.ROOT))); }
From source file:org.zalando.logbook.JsonHttpLogFormatter.java
private static String translate(final Origin origin) { return origin.name().toLowerCase(Locale.ROOT); }
From source file:org.apache.calcite.adapter.elasticsearch.ElasticsearchTable.java
/** * Creates an ElasticsearchTable./*from ww w. j av a 2 s . c om*/ * @param client low-level ES rest client * @param mapper Jackson API * @param indexName elastic search index * @param typeName elastic searh index type */ ElasticsearchTable(RestClient client, ObjectMapper mapper, String indexName, String typeName) { super(indexName, typeName, Objects.requireNonNull(mapper, "mapper")); this.restClient = Objects.requireNonNull(client, "client"); try { this.version = detectVersion(client, mapper); } catch (IOException e) { final String message = String.format(Locale.ROOT, "Couldn't detect ES version " + "for %s/%s", indexName, typeName); throw new UncheckedIOException(message, e); } }
From source file:ch.cyberduck.core.ftp.FTPParserFactory.java
public CompositeFileEntryParser createFileEntryParser(final String system, final TimeZone timezone) throws ParserInitializationException { if (null != system) { String ukey = system.toUpperCase(Locale.ROOT); if (ukey.contains(FTPClientConfig.SYST_UNIX)) { return this.createUnixFTPEntryParser(timezone); } else if (ukey.contains(FTPClientConfig.SYST_VMS)) { throw new ParserInitializationException( String.format("\"%s\" is not currently a supported system.", system)); } else if (ukey.contains(FTPClientConfig.SYST_NETWARE)) { return this.createNetwareFTPEntryParser(timezone); } else if (ukey.contains(FTPClientConfig.SYST_NT)) { return this.createNTFTPEntryParser(timezone); } else if (ukey.contains(FTPClientConfig.SYST_OS2)) { return this.createOS2FTPEntryParser(timezone); } else if (ukey.contains(FTPClientConfig.SYST_OS400)) { return this.createOS400FTPEntryParser(timezone); } else if (ukey.contains(FTPClientConfig.SYST_MVS)) { return this.createUnixFTPEntryParser(timezone); }/*from w ww . j av a 2s . c o m*/ } // Defaulting to UNIX parser return this.createUnixFTPEntryParser(timezone); }
From source file:org.gofleet.internacionalization.I18n.java
public String getString(String key) { try {// w w w.java 2 s.c om return getResourceBundle(Locale.ROOT).getString(key); } catch (Throwable e) { return key; } }
From source file:com.adaptris.core.http.MetadataContentTypeProvider.java
private String extract(AdaptrisMessage msg) throws CoreException { if (isBlank(getMetadataKey())) { throw new CoreException("metadata key is blank"); }/*w w w . ja v a 2s . c om*/ return defaultIfBlank(msg.getMetadataValue(getMetadataKey()), defaultMimeType).toLowerCase(Locale.ROOT); }
From source file:br.ufrj.ppgi.jemf.mobile.bean.InterestPoint.java
/** * Set the status as String value.//w w w . ja va 2 s. c o m * @param status */ public void setStatusString(String status) { setStatus(EnumLocationStatus.valueOf(status.toUpperCase(Locale.ROOT))); }