/** * Returns true if two strings are equals ignoring the letter case in {@link #LOCALE_INTERNAL} locale. * * @param str1 first string to compare * @param str2 second string to compare * @return true if the strings are equals ignoring the case */ public static boolean equalsIgnoreCase(String str1, String str2) { return (str1 == null || str2 == null) ? false : (str1 == str2 || lowerCaseInternal(str1).equals(lowerCaseInternal(str2))); } }
/** * Returns true if two strings are equals ignoring the letter case in {@link #LOCALE_INTERNAL} locale. * * @param str1 first string to compare * @param str2 second string to compare * @return true if the strings are equals ignoring the case */ public static boolean equalsIgnoreCase(String str1, String str2) { return (str1 == null || str2 == null) ? false : (str1 == str2 || lowerCaseInternal(str1).equals(lowerCaseInternal(str2))); } }
boolean hasHigherPrecedence(String operator1, String operator2) { return PRECEDENCE.get(lowerCaseInternal(operator1)) > PRECEDENCE.get(lowerCaseInternal(operator2)); }
boolean isOperand(String string) { return PRECEDENCE.containsKey(lowerCaseInternal(string)); }
public static boolean getBooleanValue(final String value) { return parseBoolean(StringUtil.lowerCaseInternal(value)); }
boolean hasHigherPrecedence(String operator1, String operator2) { return PRECEDENCE.get(lowerCaseInternal(operator1)) > PRECEDENCE.get(lowerCaseInternal(operator2)); }
boolean isOperand(String string) { return PRECEDENCE.containsKey(lowerCaseInternal(string)); }
protected static boolean getBooleanValue(final String value) { return parseBoolean(StringUtil.lowerCaseInternal(value)); }
public NetworkConfig() { String os = StringUtil.lowerCaseInternal(System.getProperty("os.name")); reuseAddress = (!os.contains("win")); }
public NetworkConfig() { String os = StringUtil.lowerCaseInternal(System.getProperty("os.name")); reuseAddress = (!os.contains("win")); }
public static String cleanNodeName(final Node node) { final String nodeName = node.getLocalName(); if (nodeName == null) { throw new HazelcastException("Local node name is null for " + node); } return StringUtil.lowerCaseInternal(nodeName); }
public static String cleanNodeName(final Node node) { final String nodeName = node.getLocalName(); if (nodeName == null) { throw new HazelcastException("Local node name is null for " + node); } return StringUtil.lowerCaseInternal(nodeName); }
private void handleEcho(String command) { String threadName = lowerCaseInternal(Thread.currentThread().getName()); if (!threadName.contains("main")) { println(" [" + Thread.currentThread().getName() + "] " + command); } else { println(command); } }
private void handleEcho(String command) { String threadName = lowerCaseInternal(Thread.currentThread().getName()); if (!threadName.contains("main")) { println(" [" + Thread.currentThread().getName() + "] " + command); } else { println(command); } }
private void handleEcho(String command) { String threadName = lowerCaseInternal(Thread.currentThread().getName()); if (!threadName.contains("main")) { println(" [" + Thread.currentThread().getName() + "] " + command); } else { println(command); } }
private void handleEcho(String command) { String threadName = lowerCaseInternal(Thread.currentThread().getName()); if (!threadName.contains("main")) { println(" [" + Thread.currentThread().getName() + "] " + command); } else { println(command); } }
private void setReadyToReadData(ByteBuffer cb) { while (!readyToReadData && cb.hasRemaining()) { byte b = cb.get(); if (b == CARRIAGE_RETURN) { readLF(cb); processLine(StringUtil.lowerCaseInternal(toStringAndClear(lineBuffer))); if (nextLine) { readyToReadData = true; } nextLine = true; break; } nextLine = false; appendToBuffer(b); } }
private void setReadyToReadData(ByteBuffer cb) { while (!readyToReadData && cb.hasRemaining()) { byte b = cb.get(); if (b == CARRIAGE_RETURN) { readLF(cb); processLine(StringUtil.lowerCaseInternal(toStringAndClear(lineBuffer))); if (nextLine) { readyToReadData = true; } nextLine = true; break; } nextLine = false; appendToBuffer(b); } }
protected void handleContains(String[] args) { String iteratorStr = args[0]; boolean key = lowerCaseInternal(iteratorStr).endsWith("key"); String data = args[1]; boolean result = false; if (iteratorStr.startsWith("s.")) { result = getSet().contains(data); } else if (iteratorStr.startsWith("m.")) { result = (key) ? getMap().containsKey(data) : getMap().containsValue(data); } else if (iteratorStr.startsWith("mmm.")) { result = (key) ? getMultiMap().containsKey(data) : getMultiMap().containsValue(data); } else if (iteratorStr.startsWith("q.")) { result = getQueue().contains(data); } else if (iteratorStr.startsWith("l.")) { result = getList().contains(data); } println("Contains: " + result); }
private void handleGetClusterState(HttpPostCommand command) throws UnsupportedEncodingException { String res; try { Node node = textCommandService.getNode(); ClusterService clusterService = node.getClusterService(); if (!checkCredentials(command)) { res = response(ResponseType.FORBIDDEN); } else { ClusterState clusterState = clusterService.getClusterState(); res = response(ResponseType.SUCCESS, "state", lowerCaseInternal(clusterState.toString())); } } catch (Throwable throwable) { logger.warning("Error occurred while getting cluster state", throwable); res = exceptionResponse(throwable); } command.setResponse(HttpCommand.CONTENT_TYPE_JSON, stringToBytes(res)); }