List of usage examples for java.lang String toUpperCase
public String toUpperCase()
From source file:ch.aonyx.broker.ib.api.data.scanner.StockType.java
public static final StockType fromLabel(final String label) { if (StringUtils.isBlank(label)) { return EMPTY; }// w w w . j a v a 2 s . c om final String labelUpperCase = label.toUpperCase(); if (MAP.containsKey(labelUpperCase)) { return MAP.get(labelUpperCase); } return UNKNOWN; }
From source file:ch.aonyx.broker.ib.api.data.fundamental.ReportType.java
public static final ReportType fromLabel(final String label) { if (StringUtils.isBlank(label)) { return EMPTY; }/* w w w . j a v a2 s.c o m*/ final String labelUpperCase = label.toUpperCase(); if (MAP.containsKey(labelUpperCase)) { return MAP.get(labelUpperCase); } return UNKNOWN; }
From source file:Soundex.java
/** Convert the given String to its Soundex code. * @return null If the given string can't be mapped to Soundex. */// ww w . j av a 2 s . co m public static String soundex(String s) { // Algorithm works on uppercase (mainframe era). String t = s.toUpperCase(); StringBuffer res = new StringBuffer(); char c, prev = '?'; // Main loop: find up to 4 chars that map. for (int i = 0; i < t.length() && res.length() < 4 && (c = t.charAt(i)) != ','; i++) { // Check to see if the given character is alphabetic. // Text is already converted to uppercase. Algorithm // only handles ASCII letters, do NOT use Character.isLetter()! // Also, skip double letters. if (c >= 'A' && c <= 'Z' && c != prev) { prev = c; // First char is installed unchanged, for sorting. if (i == 0) res.append(c); else { char m = MAP[c - 'A']; if (m != '0') res.append(m); } } } if (res.length() == 0) return null; for (int i = res.length(); i < 4; i++) res.append('0'); return res.toString(); }
From source file:ch.aonyx.broker.ib.api.data.historical.HistoricalDataType.java
public static final HistoricalDataType fromLabel(final String label) { if (StringUtils.isBlank(label)) { return EMPTY; }/* w w w. j a va2 s .c o m*/ final String labelUpperCase = label.toUpperCase(); if (MAP.containsKey(labelUpperCase)) { return MAP.get(labelUpperCase); } return UNKNOWN; }
From source file:ch.aonyx.broker.ib.api.order.OrderStatus.java
public static final OrderStatus fromLabel(final String label) { if (StringUtils.isBlank(label)) { return EMPTY; }//from w ww .ja va2 s . c om final String labelUpperCase = label.toUpperCase(); if (MAP.containsKey(labelUpperCase)) { return MAP.get(labelUpperCase); } return UNKNOWN; }
From source file:Main.java
/** * Gets the columnn number of the string cell reference * * @param s the string to parse//from w ww. j a va2 s . c o m * @return the column portion of the cell reference */ public static int getColumn(String s) { int colnum = 0; int numindex = getNumberIndex(s); String s2 = s.toUpperCase(); int startPos = s.lastIndexOf(sheetInd) + 1; if (s.charAt(startPos) == fixedInd) { startPos++; } int endPos = numindex; if (s.charAt(numindex - 1) == fixedInd) { endPos--; } for (int i = startPos; i < endPos; i++) { if (i != startPos) { colnum = (colnum + 1) * 26; } colnum += (int) s2.charAt(i) - (int) 'A'; } return colnum; }
From source file:Main.java
public static String getBCC(byte[] paramArrayOfByte) { byte[] arrayOfByte = new byte[1]; for (int i = 0;; i++) { if (i >= paramArrayOfByte.length) { String str = Integer.toHexString(0xFF & arrayOfByte[0]); if (str.length() == 1) { str = '0' + str; }/* w ww. ja v a2 s . c o m*/ return "" + str.toUpperCase(); } arrayOfByte[0] = ((byte) (arrayOfByte[0] ^ paramArrayOfByte[i])); } }
From source file:ch.aonyx.broker.ib.api.execution.Side.java
public static final Side fromAcronym(final String acronym) { if (StringUtils.isBlank(acronym)) { return EMPTY; }//from w w w. j ava 2s . c o m final String acronymUpperCase = acronym.toUpperCase(); if (MAP.containsKey(acronymUpperCase)) { return MAP.get(acronymUpperCase); } return UNKNOWN; }
From source file:com.ifunshow.dbc.util.DBHelper.java
public static String getQuerySQL(String dbType, String SqlKey) { String sqlStr = null;//from ww w .java2 s. c o m if (sqlMap.containsKey(dbType.toUpperCase() + "." + SqlKey.toUpperCase())) { sqlStr = sqlMap.get(dbType.toUpperCase() + "." + SqlKey.toUpperCase()); } return sqlStr; }
From source file:ch.aonyx.broker.ib.api.contract.SecurityIdentifierCode.java
public static final SecurityIdentifierCode fromAcronym(final String acronym) { if (StringUtils.isBlank(acronym)) { return EMPTY; }//from ww w .j a v a 2 s . c o m final String acronymUpperCase = acronym.toUpperCase(); if (MAP.containsKey(acronymUpperCase)) { return MAP.get(acronymUpperCase); } return UNKNOWN; }