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

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

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

origin: apache/flink

/**
 * Get the value of the <code>name</code> property as a <code>boolean</code>.
 * If no such property is specified, or if the specified value is not a valid
 * <code>boolean</code>, then <code>defaultValue</code> is returned.
 *
 * @param name property name.
 * @param defaultValue default value.
 * @return property value as a <code>boolean</code>,
 *         or <code>defaultValue</code>.
 */
public boolean getBoolean(String name, boolean defaultValue) {
  String valueString = getTrimmed(name);
  if (null == valueString || valueString.isEmpty()) {
    return defaultValue;
  }
  if (StringUtils.equalsIgnoreCase("true", valueString))
    return true;
  else if (StringUtils.equalsIgnoreCase("false", valueString))
    return false;
  else return defaultValue;
}
origin: apache/flink

/**
 * Get the value of the <code>name</code> property as a <code>boolean</code>.
 * If no such property is specified, or if the specified value is not a valid
 * <code>boolean</code>, then <code>defaultValue</code> is returned.
 *
 * @param name property name.
 * @param defaultValue default value.
 * @return property value as a <code>boolean</code>,
 *         or <code>defaultValue</code>.
 */
public boolean getBoolean(String name, boolean defaultValue) {
 String valueString = getTrimmed(name);
 if (null == valueString || valueString.isEmpty()) {
  return defaultValue;
 }
 if (StringUtils.equalsIgnoreCase("true", valueString))
  return true;
 else if (StringUtils.equalsIgnoreCase("false", valueString))
  return false;
 else return defaultValue;
}
origin: org.apache.hadoop/hadoop-common

/** 
 * Get the value of the <code>name</code> property as a <code>boolean</code>.  
 * If no such property is specified, or if the specified value is not a valid
 * <code>boolean</code>, then <code>defaultValue</code> is returned.
 * 
 * @param name property name.
 * @param defaultValue default value.
 * @return property value as a <code>boolean</code>, 
 *         or <code>defaultValue</code>. 
 */
public boolean getBoolean(String name, boolean defaultValue) {
 String valueString = getTrimmed(name);
 if (null == valueString || valueString.isEmpty()) {
  return defaultValue;
 }
 if (StringUtils.equalsIgnoreCase("true", valueString))
  return true;
 else if (StringUtils.equalsIgnoreCase("false", valueString))
  return false;
 else return defaultValue;
}
origin: org.apache.hadoop/hadoop-hdfs

if (xmlInput && StringUtils.equalsIgnoreCase("xml", processor)) {
 System.err.println("XML format input file is not allowed"
   + " to be processed by XML processor.");
 return -1;
} else if(!xmlInput && StringUtils.equalsIgnoreCase("binary", processor)) {
 System.err.println("Binary format input file is not allowed"
   + " to be processed by Binary processor.");
origin: org.apache.hadoop/hadoop-hdfs

if(StringUtils.equalsIgnoreCase("binary", processor)) {
 return new BinaryEditsVisitor(filename);
  out = new TeeOutputStream(outs);
 if(StringUtils.equalsIgnoreCase("xml", processor)) {
  vis = new XmlEditsVisitor(out);
 } else if(StringUtils.equalsIgnoreCase("stats", processor)) {
  vis = new StatisticsEditsVisitor(out);
 } else {
origin: org.apache.atlas/atlas-intg

@JsonIgnore
public boolean isConstraintType(String name) {
  return StringUtils.equalsIgnoreCase(name, this.type);
}
origin: org.apache.atlas/atlas-intg

public static AtlasAttributeDef findAttribute(Collection<AtlasAttributeDef> attributeDefs, String attrName) {
  AtlasAttributeDef ret = null;
  if (CollectionUtils.isNotEmpty(attributeDefs)) {
    for (AtlasAttributeDef attributeDef : attributeDefs) {
      if (StringUtils.equalsIgnoreCase(attributeDef.getName(), attrName)) {
        ret = attributeDef;
        break;
      }
    }
  }
  return ret;
}
origin: org.apache.atlas/atlas-intg

private static AtlasEnumElementDef findElement(List<AtlasEnumElementDef> elementDefs, String elemValue) {
  AtlasEnumElementDef ret = null;
  if (CollectionUtils.isNotEmpty(elementDefs)) {
    for (AtlasEnumElementDef elementDef : elementDefs) {
      if (StringUtils.equalsIgnoreCase(elementDef.getValue(), elemValue)) {
        ret = elementDef;
        break;
      }
    }
  }
  return ret;
}
origin: apache/incubator-atlas

private static AtlasEnumElementDef findElement(List<AtlasEnumElementDef> elementDefs, String elemValue) {
  AtlasEnumElementDef ret = null;
  if (CollectionUtils.isNotEmpty(elementDefs)) {
    for (AtlasEnumElementDef elementDef : elementDefs) {
      if (StringUtils.equalsIgnoreCase(elementDef.getValue(), elemValue)) {
        ret = elementDef;
        break;
      }
    }
  }
  return ret;
}
origin: apache/incubator-atlas

public static AtlasAttributeDef findAttribute(Collection<AtlasAttributeDef> attributeDefs, String attrName) {
  AtlasAttributeDef ret = null;
  if (CollectionUtils.isNotEmpty(attributeDefs)) {
    for (AtlasAttributeDef attributeDef : attributeDefs) {
      if (StringUtils.equalsIgnoreCase(attributeDef.getName(), attrName)) {
        ret = attributeDef;
        break;
      }
    }
  }
  return ret;
}
origin: apache/incubator-atlas

@JsonIgnore
public boolean isConstraintType(String name) {
  return StringUtils.equalsIgnoreCase(name, this.type);
}
origin: org.apache.atlas/atlas-intg

public void removeAttribute(String attrName) {
  List<AtlasAttributeDef> a = this.attributeDefs;
  if (hasAttribute(a, attrName)) {
    List<AtlasAttributeDef> tmpList = new ArrayList<>();
    // copy existing attributes, except ones having same name as the attribute being removed
    for (AtlasAttributeDef existingAttrDef : a) {
      if (!StringUtils.equalsIgnoreCase(existingAttrDef.getName(), attrName)) {
        tmpList.add(existingAttrDef);
      }
    }
    this.attributeDefs = tmpList;
  }
}
origin: apache/incubator-atlas

public void removeAttribute(String attrName) {
  List<AtlasAttributeDef> a = this.attributeDefs;
  if (hasAttribute(a, attrName)) {
    List<AtlasAttributeDef> tmpList = new ArrayList<>();
    // copy existing attributes, except ones having same name as the attribute being removed
    for (AtlasAttributeDef existingAttrDef : a) {
      if (!StringUtils.equalsIgnoreCase(existingAttrDef.getName(), attrName)) {
        tmpList.add(existingAttrDef);
      }
    }
    this.attributeDefs = tmpList;
  }
}
origin: org.apache.atlas/atlas-intg

public void removeElement(String elemValue) {
  List<AtlasEnumElementDef> e = this.elementDefs;
  // if element doesn't exist, no need to create the tmpList below
  if (hasElement(e, elemValue)) {
    List<AtlasEnumElementDef> tmpList = new ArrayList<>();
    // copy existing elements, except ones having same value as the element being removed
    for (AtlasEnumElementDef existingElem : e) {
      if (!StringUtils.equalsIgnoreCase(existingElem.getValue(), elemValue)) {
        tmpList.add(existingElem);
      }
    }
    this.elementDefs = tmpList;
  }
}
origin: apache/incubator-atlas

public void addElement(AtlasEnumElementDef elementDef) {
  List<AtlasEnumElementDef> e = this.elementDefs;
  List<AtlasEnumElementDef> tmpList = new ArrayList<>();
  if (CollectionUtils.isNotEmpty(e)) {
    // copy existing elements, except ones having same value as the element being added
    for (AtlasEnumElementDef existingElem : e) {
      if (!StringUtils.equalsIgnoreCase(existingElem.getValue(), elementDef.getValue())) {
        tmpList.add(existingElem);
      }
    }
  }
  tmpList.add(new AtlasEnumElementDef(elementDef));
  this.elementDefs = tmpList;
}
origin: org.apache.atlas/atlas-intg

public void addElement(AtlasEnumElementDef elementDef) {
  List<AtlasEnumElementDef> e = this.elementDefs;
  List<AtlasEnumElementDef> tmpList = new ArrayList<>();
  if (CollectionUtils.isNotEmpty(e)) {
    // copy existing elements, except ones having same value as the element being added
    for (AtlasEnumElementDef existingElem : e) {
      if (!StringUtils.equalsIgnoreCase(existingElem.getValue(), elementDef.getValue())) {
        tmpList.add(existingElem);
      }
    }
  }
  tmpList.add(new AtlasEnumElementDef(elementDef));
  this.elementDefs = tmpList;
}
origin: org.apache.atlas/atlas-intg

@Test(enabled=false)
public void testGetAppConfigurationEntryStringForKafkaClient() {
  AppConfigurationEntry[] entries =
      Configuration.getConfiguration().getAppConfigurationEntry("KafkaClient");
  Assert.assertNotNull(entries);
  Assert.assertEquals(1, entries.length);
  String principal = (String) entries[0].getOptions().get("principal");
  Assert.assertNotNull(principal);
  String[] components = principal.split("[/@]");
  Assert.assertEquals(3, components.length);
  Assert.assertEquals(false, StringUtils.equalsIgnoreCase(components[1], "_HOST"));
}
origin: apache/atlas

@Test(enabled=false)
public void testGetAppConfigurationEntryStringForKafkaClient() {
  AppConfigurationEntry[] entries =
      Configuration.getConfiguration().getAppConfigurationEntry("KafkaClient");
  Assert.assertNotNull(entries);
  Assert.assertEquals(1, entries.length);
  String principal = (String) entries[0].getOptions().get("principal");
  Assert.assertNotNull(principal);
  String[] components = principal.split("[/@]");
  Assert.assertEquals(3, components.length);
  Assert.assertEquals(false, StringUtils.equalsIgnoreCase(components[1], "_HOST"));
}
origin: org.apache.atlas/atlas-intg

@Test(enabled=false)
public void testGetAppConfigurationEntryStringForMyClient() {
  AppConfigurationEntry[] entries =
      Configuration.getConfiguration().getAppConfigurationEntry("myClient");
  Assert.assertNotNull(entries);
  Assert.assertEquals(2, entries.length);
  String principal = (String) entries[0].getOptions().get("principal");
  Assert.assertNotNull(principal);
  String[] components = principal.split("[/@]");
  Assert.assertEquals(3, components.length);
  Assert.assertEquals(true, StringUtils.equalsIgnoreCase(components[1], "abcd"));
  principal = (String) entries[1].getOptions().get("principal");
  Assert.assertNotNull(principal);
  components = principal.split("[/@]");
  Assert.assertEquals(2, components.length);
}
origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

 void replaceQueueFromPlacementContext(
   ApplicationPlacementContext placementContext,
   ApplicationSubmissionContext context) {
  // Set it to ApplicationSubmissionContext
  //apply queue mapping only to new application submissions
  if (placementContext != null && !StringUtils.equalsIgnoreCase(
    context.getQueue(), placementContext.getQueue())) {
   LOG.info("Placed application=" + context.getApplicationId() +
     " to queue=" + placementContext.getQueue() + ", original queue="
     + context
     .getQueue());
   context.setQueue(placementContext.getQueue());
  }
 }
}
org.apache.hadoop.utilStringUtilsequalsIgnoreCase

Javadoc

Compare strings locale-freely by using String#equalsIgnoreCase.

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,
  • format,
  • formatTimeDiff,
  • getTrimmedStringCollection

Popular in Java

  • Making http post requests using okhttp
  • onCreateOptionsMenu (Activity)
  • requestLocationUpdates (LocationManager)
  • getApplicationContext (Context)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • 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