Tabnine Logo
StringUtils.hasChar
Code IndexAdd Tabnine to your IDE (free)

How to use
hasChar
method
in
org.apache.hadoop.util.StringUtils

Best Java code snippets using org.apache.hadoop.util.StringUtils.hasChar (Showing top 14 results out of 315)

origin: org.apache.hadoop/hadoop-common

/**
 * @param charsToEscape array of characters to be escaped
 */
public static String escapeString(String str, char escapeChar, 
                 char[] charsToEscape) {
 if (str == null) {
  return null;
 }
 StringBuilder result = new StringBuilder();
 for (int i=0; i<str.length(); i++) {
  char curChar = str.charAt(i);
  if (curChar == escapeChar || hasChar(charsToEscape, curChar)) {
   // special char
   result.append(escapeChar);
  }
  result.append(curChar);
 }
 return result.toString();
}

origin: org.apache.hadoop/hadoop-common

char curChar = str.charAt(i);
if (hasPreEscape) {
 if (curChar != escapeChar && !hasChar(charsToEscape, curChar)) {
 hasPreEscape = false;
} else {
 if (hasChar(charsToEscape, curChar)) {
  throw new IllegalArgumentException("Illegal escaped string " + str + 
    " unescaped " + curChar + " at " + i);
origin: org.jvnet.hudson.hadoop/hadoop-core

/**
 * @param charsToEscape array of characters to be escaped
 */
public static String escapeString(String str, char escapeChar, 
                 char[] charsToEscape) {
 if (str == null) {
  return null;
 }
 StringBuilder result = new StringBuilder();
 for (int i=0; i<str.length(); i++) {
  char curChar = str.charAt(i);
  if (curChar == escapeChar || hasChar(charsToEscape, curChar)) {
   // special char
   result.append(escapeChar);
  }
  result.append(curChar);
 }
 return result.toString();
}

origin: com.github.jiayuhan-it/hadoop-common

/**
 * @param charsToEscape array of characters to be escaped
 */
public static String escapeString(String str, char escapeChar, 
                 char[] charsToEscape) {
 if (str == null) {
  return null;
 }
 StringBuilder result = new StringBuilder();
 for (int i=0; i<str.length(); i++) {
  char curChar = str.charAt(i);
  if (curChar == escapeChar || hasChar(charsToEscape, curChar)) {
   // special char
   result.append(escapeChar);
  }
  result.append(curChar);
 }
 return result.toString();
}

origin: io.hops/hadoop-common

/**
 * @param charsToEscape array of characters to be escaped
 */
public static String escapeString(String str, char escapeChar,
  char[] charsToEscape) {
 if (str == null) {
  return null;
 }
 StringBuilder result = new StringBuilder();
 for (int i = 0; i < str.length(); i++) {
  char curChar = str.charAt(i);
  if (curChar == escapeChar || hasChar(charsToEscape, curChar)) {
   // special char
   result.append(escapeChar);
  }
  result.append(curChar);
 }
 return result.toString();
}

origin: ch.cern.hadoop/hadoop-common

/**
 * @param charsToEscape array of characters to be escaped
 */
public static String escapeString(String str, char escapeChar, 
                 char[] charsToEscape) {
 if (str == null) {
  return null;
 }
 StringBuilder result = new StringBuilder();
 for (int i=0; i<str.length(); i++) {
  char curChar = str.charAt(i);
  if (curChar == escapeChar || hasChar(charsToEscape, curChar)) {
   // special char
   result.append(escapeChar);
  }
  result.append(curChar);
 }
 return result.toString();
}

origin: com.facebook.hadoop/hadoop-core

/**
 * @param charsToEscape array of characters to be escaped
 */
public static String escapeString(String str, char escapeChar, 
                 char[] charsToEscape) {
 if (str == null) {
  return null;
 }
 StringBuilder result = new StringBuilder();
 for (int i=0; i<str.length(); i++) {
  char curChar = str.charAt(i);
  if (curChar == escapeChar || hasChar(charsToEscape, curChar)) {
   // special char
   result.append(escapeChar);
  }
  result.append(curChar);
 }
 return result.toString();
}

origin: io.prestosql.hadoop/hadoop-apache

/**
 * @param charsToEscape array of characters to be escaped
 */
public static String escapeString(String str, char escapeChar, 
                 char[] charsToEscape) {
 if (str == null) {
  return null;
 }
 StringBuilder result = new StringBuilder();
 for (int i=0; i<str.length(); i++) {
  char curChar = str.charAt(i);
  if (curChar == escapeChar || hasChar(charsToEscape, curChar)) {
   // special char
   result.append(escapeChar);
  }
  result.append(curChar);
 }
 return result.toString();
}

origin: io.hops/hadoop-common

char curChar = str.charAt(i);
if (hasPreEscape) {
 if (curChar != escapeChar && !hasChar(charsToEscape, curChar)) {
 hasPreEscape = false;
} else {
 if (hasChar(charsToEscape, curChar)) {
  throw new IllegalArgumentException("Illegal escaped string " + str +
    " unescaped " + curChar + " at " + i);
origin: com.facebook.hadoop/hadoop-core

char curChar = str.charAt(i);
if (hasPreEscape) {
 if (curChar != escapeChar && !hasChar(charsToEscape, curChar)) {
 hasPreEscape = false;
} else {
 if (hasChar(charsToEscape, curChar)) {
  throw new IllegalArgumentException("Illegal escaped string " + str + 
    " unescaped " + curChar + " at " + i);
origin: org.jvnet.hudson.hadoop/hadoop-core

char curChar = str.charAt(i);
if (hasPreEscape) {
 if (curChar != escapeChar && !hasChar(charsToEscape, curChar)) {
 hasPreEscape = false;
} else {
 if (hasChar(charsToEscape, curChar)) {
  throw new IllegalArgumentException("Illegal escaped string " + str + 
    " unescaped " + curChar + " at " + i);
origin: ch.cern.hadoop/hadoop-common

char curChar = str.charAt(i);
if (hasPreEscape) {
 if (curChar != escapeChar && !hasChar(charsToEscape, curChar)) {
 hasPreEscape = false;
} else {
 if (hasChar(charsToEscape, curChar)) {
  throw new IllegalArgumentException("Illegal escaped string " + str + 
    " unescaped " + curChar + " at " + i);
origin: com.github.jiayuhan-it/hadoop-common

char curChar = str.charAt(i);
if (hasPreEscape) {
 if (curChar != escapeChar && !hasChar(charsToEscape, curChar)) {
 hasPreEscape = false;
} else {
 if (hasChar(charsToEscape, curChar)) {
  throw new IllegalArgumentException("Illegal escaped string " + str + 
    " unescaped " + curChar + " at " + i);
origin: io.prestosql.hadoop/hadoop-apache

char curChar = str.charAt(i);
if (hasPreEscape) {
 if (curChar != escapeChar && !hasChar(charsToEscape, curChar)) {
 hasPreEscape = false;
} else {
 if (hasChar(charsToEscape, curChar)) {
  throw new IllegalArgumentException("Illegal escaped string " + str + 
    " unescaped " + curChar + " at " + i);
org.apache.hadoop.utilStringUtilshasChar

Popular methods of StringUtils

  • stringifyException
    Make a string representation of the exception.
  • join
    Concatenates strings, using a separator.
  • split
  • arrayToString
  • toLowerCase
    Converts all of the characters in this String to lower case with Locale.ENGLISH.
  • escapeString
  • startupShutdownMessage
    Print a log message for starting up and shutting down
  • getStrings
    Returns an arraylist of strings.
  • toUpperCase
    Converts all of the characters in this String to upper case with Locale.ENGLISH.
  • byteToHexString
    Given an array of bytes it will convert the bytes to a hex string representation of the bytes
  • formatTime
    Given the time in long milliseconds, returns a String in the format Xhrs, Ymins, Z sec.
  • unEscapeString
  • formatTime,
  • unEscapeString,
  • getStringCollection,
  • byteDesc,
  • formatPercent,
  • getTrimmedStrings,
  • equalsIgnoreCase,
  • format,
  • formatTimeDiff,
  • getTrimmedStringCollection

Popular in Java

  • Reading from database using SQL prepared statement
  • getContentResolver (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • startActivity (Activity)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • JFrame (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now