congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
MultiMap.containsKey
Code IndexAdd Tabnine to your IDE (free)

How to use
containsKey
method
in
org.apache.commons.collections4.MultiMap

Best Java code snippets using org.apache.commons.collections4.MultiMap.containsKey (Showing top 4 results out of 315)

origin: org.apache.commons/commons-collections4

/**
 * {@inheritDoc}
 * <p>
 * Note: uses the index for fast lookup
 */
@SuppressWarnings("unchecked")
@Override
public boolean contains(final Object object) {
  return index.containsKey(keyTransformer.transform((C) object));
}
origin: org.apache.commons/commons-collections4

/**
 * Provides checking for adding the index.
 *
 * @param object the object to index
 * @throws IllegalArgumentException if the object maps to an existing key and the index
 *   enforces a uniqueness constraint
 */
private void addToIndex(final C object) {
  final K key = keyTransformer.transform(object);
  if (uniqueIndex && index.containsKey(key)) {
    throw new IllegalArgumentException("Duplicate key in uniquely indexed collection.");
  }
  index.put(key, object);
}
origin: info.magnolia.cache/magnolia-cache-core

@Override
public boolean containsHeader(String name) {
  return headers.containsKey(name);
}
origin: info.magnolia.cache/magnolia-cache-core

public InMemoryCachedEntry(byte[] out, String contentType, String characterEncoding, int statusCode, MultiMap headers, long modificationDate, String originalUrl, int timeToLiveInSeconds) throws IOException {
  super(contentType, characterEncoding, statusCode, headers, modificationDate, originalUrl, timeToLiveInSeconds);
  // content which is actually of a compressed type must stay that way
  if (GZipUtil.isGZipped(out)) {
    this.gzippedContent = out;
    boolean isGzippedResponse = headers.containsKey("Content-Encoding") && ((Collection)headers.get("Content-Encoding")).contains("gzip");
    if(isGzippedResponse){
      this.plainContent = GZipUtil.ungzip(out);
    }
    // in case of serving a gzip file (gif for instance)
    else{
      this.plainContent = null;
    }
  } else {
    this.gzippedContent = GZipUtil.gzip(out);
    this.plainContent = out;
  }
}
org.apache.commons.collections4MultiMapcontainsKey

Popular methods of MultiMap

  • get
    Gets the collection of values associated with the specified key. The returned value will implement C
  • put
    Adds the value to the collection associated with the specified key. Unlike a normal Map the previous
  • clear
  • entrySet
  • keySet
  • remove
    Removes all values associated with the specified key. Implementations typically return null from a s

Popular in Java

  • Start an intent from android
  • onRequestPermissionsResult (Fragment)
  • getApplicationContext (Context)
  • findViewById (Activity)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Collectors (java.util.stream)
  • JComboBox (javax.swing)
  • Top Sublime Text 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