List of usage examples for java.util Locale ENGLISH
Locale ENGLISH
To view the source code for java.util Locale ENGLISH.
Click Source Link
From source file:net.sf.dynamicreports.test.jasper.chart.PercentageChartDataTest.java
@Override protected void configureReport(JasperReportBuilder rb) { TextColumnBuilder<String> column1; TextColumnBuilder<Integer> column2; TextColumnBuilder<Integer> column3; Locale.setDefault(Locale.ENGLISH); rb.setPageFormat(PageType.A2, PageOrientation.PORTRAIT) .columns(column1 = col.column("Column1", "field1", String.class), column2 = col.column("Column2", "field2", Integer.class), column3 = col.column("Column3", "field3", Integer.class)) .summary(/*from w ww . j a v a 2s . c o m*/ cmp.horizontalList( cht.barChart().setShowValues(true).setShowPercentages(true).setCategory(column1) .series(cht.serie(column2), cht.serie(column3)), cht.bar3DChart().setShowValues(true).setShowPercentages(true) .setPercentValuePattern("#,##0.#").setCategory(column1) .series(cht.serie(column2), cht.serie(column3)), cht.stackedBarChart().setShowPercentages(true).setCategory(column1) .series(cht.serie(column2), cht.serie(column3)), cht.stackedBar3DChart().setShowPercentages(true).setCategory(column1) .series(cht.serie(column2), cht.serie(column3)), cht.areaChart().setShowPercentages(true).setCategory(column1) .series(cht.serie(column2), cht.serie(column3))), cmp.horizontalList( cht.stackedAreaChart().setShowPercentages(true).setCategory(column1) .series(cht.serie(column2), cht.serie(column3)), cht.layeredBarChart().setShowPercentages(true).setCategory(column1) .series(cht.serie(column2), cht.serie(column3)), cht.lineChart().setShowPercentages(true).setCategory(column1) .series(cht.serie(column2), cht.serie(column3))), cht.pieChart().setShowPercentages(true).setPercentValuePattern("#,##0.#").setKey(column1) .series(cht.serie(column2)), cht.barChart().setShowValues(true).setShowPercentages(true).setCategory(column1) .series(cht.serie(column2)).setDataSource(new DRDataSource())); }
From source file:at.ac.univie.isc.asio.security.Permission.java
@Nonnull @Override//from w ww . j ava2s . c o m protected String normalize(@Nonnull final String val) { final String upped = val.toUpperCase(Locale.ENGLISH); if (upped.startsWith(PREFIX)) { return upped; } else { return PREFIX + upped; } }
From source file:com.gammalabs.wifianalyzer.wifi.ChannelAvailableAdapter.java
@NonNull @Override//from ww w.ja va2s .c om public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) { View view = convertView; if (view == null) { LayoutInflater layoutInflater = MainContext.INSTANCE.getMainActivity().getLayoutInflater(); view = layoutInflater.inflate(R.layout.channel_available_details, parent, false); } WiFiChannelCountry wiFiChannelCountry = getItem(position); ((TextView) view.findViewById(R.id.channel_available_country)) .setText(wiFiChannelCountry.getCountryCode() + " - " + wiFiChannelCountry.getCountryName()); ((TextView) view.findViewById(R.id.channel_available_title_ghz_2)) .setText(String.format(Locale.ENGLISH, "%s : ", WiFiBand.GHZ2.getBand())); ((TextView) view.findViewById(R.id.channel_available_ghz_2)) .setText(StringUtils.join(wiFiChannelCountry.getChannelsGHZ2().toArray(), ",")); ((TextView) view.findViewById(R.id.channel_available_title_ghz_5)) .setText(String.format(Locale.ENGLISH, "%s : ", WiFiBand.GHZ5.getBand())); ((TextView) view.findViewById(R.id.channel_available_ghz_5)) .setText(StringUtils.join(wiFiChannelCountry.getChannelsGHZ5().toArray(), ",")); return view; }
From source file:com.forerunnergames.tools.common.Strings.java
public static String aOrAn(final String nextWord) { Arguments.checkIsNotNullOrEmptyOrBlank(nextWord, "nextWord"); final String nextWordLowerCase = nextWord.toLowerCase(Locale.ENGLISH); return nextWordLowerCase.startsWith("a") || nextWordLowerCase.startsWith("e") || nextWordLowerCase.startsWith("i") || nextWordLowerCase.startsWith("o") || (nextWordLowerCase.startsWith("u") && nextWordLowerCase.length() > 1) ? "an" : "a"; }
From source file:ch.ralscha.extdirectspring.provider.RemoteProviderStoreModifyArray.java
@ExtDirectMethod(value = ExtDirectMethodType.STORE_MODIFY) public Row[] update2(Locale locale, @RequestParam(value = "id") int id, List<Row> rows) { assertThat(id).isEqualTo(10);// w ww. j av a 2 s . co m assertThat(locale).isEqualTo(Locale.ENGLISH); return rows.toArray(new Row[rows.size()]); }
From source file:de.gesundkrank.wikipedia.hadoop.io.WikiDumpLoader.java
/** * Adds input path of latest english wikipedia dump * * @param job//from w w w . j a v a 2s . c o m * @param basePathStr * @throws java.io.IOException */ public void addWikiDump(Job job, String basePathStr) throws IOException { addWikiDump(job, basePathStr, Locale.ENGLISH); }
From source file:de.tudarmstadt.ukp.dkpro.c4corpus.hadoop.statistics.vocabulary.TopNWordsCorrelation.java
/** * Computes Spearman correlation by comparing order of two corpora vocabularies * * @param goldCorpus gold corpus//from w ww . ja v a2 s. c om * @param otherCorpus other corpus * @param topN how many entries from the gold corpus should be taken * @throws IOException I/O exception */ public static void spearmanCorrelation(File goldCorpus, File otherCorpus, int topN) throws IOException { LinkedHashMap<String, Integer> gold = loadCorpusToRankedVocabulary(new FileInputStream(goldCorpus)); LinkedHashMap<String, Integer> other = loadCorpusToRankedVocabulary(new FileInputStream(otherCorpus)); double[][] matrix = new double[topN][]; if (gold.size() < topN) { throw new IllegalArgumentException( "topN (" + topN + ") cannot be greater than vocabulary size (" + gold.size() + ")"); } Iterator<Map.Entry<String, Integer>> iterator = gold.entrySet().iterator(); int counter = 0; while (counter < topN) { Map.Entry<String, Integer> next = iterator.next(); String goldWord = next.getKey(); Integer goldValue = next.getValue(); // look-up position in other corpus Integer otherValue = other.get(goldWord); if (otherValue == null) { // System.err.println("Word " + goldWord + " not found in the other corpus"); otherValue = Integer.MAX_VALUE; } matrix[counter] = new double[2]; matrix[counter][0] = goldValue; matrix[counter][1] = otherValue; counter++; } RealMatrix realMatrix = new Array2DRowRealMatrix(matrix); SpearmansCorrelation spearmansCorrelation = new SpearmansCorrelation(realMatrix); double pValue = spearmansCorrelation.getRankCorrelation().getCorrelationPValues().getEntry(0, 1); double correlation = spearmansCorrelation.getRankCorrelation().getCorrelationMatrix().getEntry(0, 1); System.out.println("Gold: " + goldCorpus.getName()); System.out.println("Other: " + otherCorpus.getName()); System.out.printf(Locale.ENGLISH, "Top N:\n%d\nCorrelation\n%.3f\np-value\n%.3f\n", topN, correlation, pValue); }
From source file:net.sf.dynamicreports.test.jasper.chart.HighLowChartTest.java
@Override protected void configureReport(JasperReportBuilder rb) { TextColumnBuilder<String> column1; TextColumnBuilder<Date> column2; TextColumnBuilder<Double> column3; TextColumnBuilder<Double> column4; TextColumnBuilder<Double> column5; TextColumnBuilder<Double> column6; TextColumnBuilder<Double> column7; Locale.setDefault(Locale.ENGLISH); rb.columns(column1 = col.column("Column1", "field1", String.class), column2 = col.column("Column2", "field2", Date.class), column3 = col.column("Column3", "field3", Double.class), column4 = col.column("Column4", "field4", Double.class), column5 = col.column("Column5", "field5", Double.class), column6 = col.column("Column6", "field6", Double.class), column7 = col.column("Column7", "field7", Double.class)) .summary(//from w w w. j a v a2s .co m cht.highLowChart().setSeries(column1).setDate(column2).setHigh(column3).setLow(column4) .setOpen(column5).setClose(column6).setVolume(column7).setShowOpenTicks(true) .setShowCloseTicks(true), cht.highLowChart().setSeries(column1).setDate(column2).setHigh(column3).setLow(column4) .setOpen(column5).setClose(column6).setVolume(column7) .setTimeAxisFormat(cht.axisFormat().setLabel("time").setLabelColor(Color.BLUE) .setLabelFont(stl.fontArialBold()) .setTickLabelFont(stl.fontArial().setItalic(true)) .setTickLabelColor(Color.CYAN).setLineColor(Color.LIGHT_GRAY) .setVerticalTickLabels(true)), cht.highLowChart().setSeries(column1).setDate(column2).setHigh(column3).setLow(column4) .setOpen(column5).setClose(column6).setVolume(column7) .setValueAxisFormat(cht.axisFormat().setLabel("value").setLabelColor(Color.BLUE) .setLabelFont(stl.fontArialBold()) .setTickLabelFont(stl.fontArial().setItalic(true)) .setTickLabelColor(Color.CYAN).setTickLabelMask("#,##0.00") .setLineColor(Color.LIGHT_GRAY).setRangeMinValueExpression(1) .setRangeMaxValueExpression(15).setVerticalTickLabels(true))); }
From source file:net.sf.dynamicreports.test.jasper.chart.CandlestickChartTest.java
@Override protected void configureReport(JasperReportBuilder rb) { TextColumnBuilder<String> column1; TextColumnBuilder<Date> column2; TextColumnBuilder<Double> column3; TextColumnBuilder<Double> column4; TextColumnBuilder<Double> column5; TextColumnBuilder<Double> column6; TextColumnBuilder<Double> column7; Locale.setDefault(Locale.ENGLISH); rb.columns(column1 = col.column("Column1", "field1", String.class), column2 = col.column("Column2", "field2", Date.class), column3 = col.column("Column3", "field3", Double.class), column4 = col.column("Column4", "field4", Double.class), column5 = col.column("Column5", "field5", Double.class), column6 = col.column("Column6", "field6", Double.class), column7 = col.column("Column7", "field7", Double.class)) .summary(//from ww w . j ava2s . c om cht.candlestickChart().setSeries(column1).setDate(column2).setHigh(column3).setLow(column4) .setOpen(column5).setClose(column6).setVolume(column7).setShowVolume(false), cht.candlestickChart().setSeries(column1).setDate(column2).setHigh(column3).setLow(column4) .setOpen(column5).setClose(column6).setVolume(column7) .setTimeAxisFormat(cht.axisFormat().setLabel("time").setLabelColor(Color.BLUE) .setLabelFont(stl.fontArialBold()) .setTickLabelFont(stl.fontArial().setItalic(true)) .setTickLabelColor(Color.CYAN).setLineColor(Color.LIGHT_GRAY) .setVerticalTickLabels(true)), cht.candlestickChart().setSeries(column1).setDate(column2).setHigh(column3).setLow(column4) .setOpen(column5).setClose(column6).setVolume(column7) .setValueAxisFormat(cht.axisFormat().setLabel("value").setLabelColor(Color.BLUE) .setLabelFont(stl.fontArialBold()) .setTickLabelFont(stl.fontArial().setItalic(true)) .setTickLabelColor(Color.CYAN).setTickLabelMask("#,##0.00") .setLineColor(Color.LIGHT_GRAY).setRangeMinValueExpression(1) .setRangeMaxValueExpression(15).setVerticalTickLabels(true))); }
From source file:com.qcadoo.model.beans.qcadooPlugin.QcadooPluginPlugin.java
public void setState(final String state) { this.state = StringUtils.trim(StringUtils.upperCase(state, Locale.ENGLISH)); }