Tabnine Logo
ListValuedMap
Code IndexAdd Tabnine to your IDE (free)

How to use
ListValuedMap
in
org.apache.commons.collections4

Best Java code snippets using org.apache.commons.collections4.ListValuedMap (Showing top 20 results out of 315)

origin: org.apache.poi/poi-ooxml

private XSSFName createAndStoreName(CTDefinedName ctName) {
  XSSFName name = new XSSFName(ctName, this);
  namedRanges.add(name);
  namedRangesByName.put(ctName.getName().toLowerCase(Locale.ENGLISH), name);
  return name;
}
origin: org.apache.poi/poi-ooxml

/**
 * Get the named ranges with the given name.
 * <i>Note:</i>Excel named ranges are case-insensitive and
 * this method performs a case-insensitive search.
 *
 * @param name  named range name
 * @return list of XSSFNames with the given name. An empty list if no named ranges could be found
 */
@Override
public List<XSSFName> getNames(String name) {
  return Collections.unmodifiableList(namedRangesByName.get(name.toLowerCase(Locale.ENGLISH)));
}
origin: org.apache.poi/poi-ooxml

void updateName(XSSFName name, String oldName) {
  if (!namedRangesByName.removeMapping(oldName.toLowerCase(Locale.ENGLISH), name)) {
    throw new IllegalArgumentException("Name was not found: " + name);
  }
  namedRangesByName.put(name.getNameName().toLowerCase(Locale.ENGLISH), name);
}
origin: Evolveum/midpoint

  } else {
    map.put(definition.getRef(), definition);
    expansions.put(definition.getRef().getLocalPart(), definition.getRef());
for (String unqualified : expansions.keySet()) {
  List<QName> names = expansions.get(unqualified);
  if (names.contains(new QName(unqualified))) {
    continue;       // cannot expand unqualified if the expanded value is also unqualified
origin: de.tudarmstadt.ukp.clarin.webanno/webanno-api-annotation

@SuppressWarnings({ "unchecked", "rawtypes" })
public Collection<VSpan> spans(long aLayerId)
{
  if (spansByLayer.containsKey(aLayerId)) {
    return Collections.unmodifiableList((List) spansByLayer.get(aLayerId));
  }
  else {
    return Collections.emptyList();
  }
}
origin: org.apache.poi/poi-ooxml

/**
 * As {@link #removeName(String)} is not necessarily unique
 * (name + sheet index is unique), this method is more accurate.
 *
 * @param name the name to remove.
 *
 * @throws IllegalArgumentException if the named range is not a part of this XSSFWorkbook
 */
@Override
public void removeName(Name name) {
  if (!namedRangesByName.removeMapping(name.getNameName().toLowerCase(Locale.ENGLISH), name)
      || !namedRanges.remove(name)) {
    throw new IllegalArgumentException("Name was not found: " + name);
  }
}
origin: de.tudarmstadt.ukp.clarin.webanno/webanno-api-annotation

@SuppressWarnings({ "unchecked", "rawtypes" })
public Collection<VArc> arcs(long aLayerId)
{
  if (arcsByLayer.containsKey(aLayerId)) {
    return Collections.unmodifiableList((List) arcsByLayer.get(aLayerId));
  }
  else {
    return Collections.emptyList();
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

/**
 * As {@link #removeName(String)} is not necessarily unique
 * (name + sheet index is unique), this method is more accurate.
 *
 * @param name the name to remove.
 *
 * @throws IllegalArgumentException if the named range is not a part of this XSSFWorkbook
 */
@Override
public void removeName(Name name) {
  if (!namedRangesByName.removeMapping(name.getNameName().toLowerCase(Locale.ENGLISH), name)
      || !namedRanges.remove(name)) {
    throw new IllegalArgumentException("Name was not found: " + name);
  }
}
origin: webanno/webanno

public void add(VComment aComment)
{
  comments.put(aComment.getVid(), aComment);
}

origin: org.apache.poi/poi-ooxml

XSSFName getBuiltInName(String builtInCode, int sheetNumber) {
  for (XSSFName name : namedRangesByName.get(builtInCode.toLowerCase(Locale.ENGLISH))) {
    if (name.getSheetIndex() == sheetNumber) {
      return name;
    }
  }
  return null;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

void updateName(XSSFName name, String oldName) {
  if (!namedRangesByName.removeMapping(oldName.toLowerCase(Locale.ENGLISH), name)) {
    throw new IllegalArgumentException("Name was not found: " + name);
  }
  namedRangesByName.put(name.getNameName().toLowerCase(Locale.ENGLISH), name);
}
origin: webanno/webanno

@SuppressWarnings({ "unchecked", "rawtypes" })
public Collection<VSpan> spans(long aLayerId)
{
  if (spansByLayer.containsKey(aLayerId)) {
    return Collections.unmodifiableList((List) spansByLayer.get(aLayerId));
  }
  else {
    return Collections.emptyList();
  }
}
origin: de.tudarmstadt.ukp.clarin.webanno/webanno-api-annotation

public void add(VComment aComment)
{
  comments.put(aComment.getVid(), aComment);
}

origin: org.apache.poi/poi-ooxml

/**
 * Remove the first named range found with the given name.
 *
 * Note: names of named ranges are not unique (name + sheet
 * index is unique), so {@link #removeName(Name)} should
 * be used if possible.
 *
 * @param name the named range name to remove
 *
 * @throws IllegalArgumentException if no named range could be found
 *
 * @deprecated 3.16. New projects should use {@link #removeName(Name)}.
 */
@Override
@Deprecated
public void removeName(String name) {
  List<XSSFName> names = namedRangesByName.get(name.toLowerCase(Locale.ENGLISH));
  if (names.isEmpty()) {
    throw new IllegalArgumentException("Named range was not found: " + name);
  }
  removeName(names.get(0));
}
origin: webanno/webanno

@SuppressWarnings({ "unchecked", "rawtypes" })
public Collection<VArc> arcs(long aLayerId)
{
  if (arcsByLayer.containsKey(aLayerId)) {
    return Collections.unmodifiableList((List) arcsByLayer.get(aLayerId));
  }
  else {
    return Collections.emptyList();
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

private XSSFName createAndStoreName(CTDefinedName ctName) {
  XSSFName name = new XSSFName(ctName, this);
  namedRanges.add(name);
  namedRangesByName.put(ctName.getName().toLowerCase(Locale.ENGLISH), name);
  return name;
}
origin: de.tudarmstadt.ukp.clarin.webanno/webanno-io-xmi

public List<AnnotationFeature> getFeatures(String aLayerName)
{
  return features.get(aLayerName);
}

origin: nikhilnanivadekar/CollectionsCompare

public ApacheCommonsDeckOfCards()
{
  this.cards = ListUtils.unmodifiableList(
      Card.streamCards().sorted().collect(Collectors.toList()));
  ListValuedMap<Suit, Card> cbs = MultiMapUtils.newListValuedHashMap();
  this.cards.forEach(card -> cbs.put(card.getSuit(), card));
  this.cardsBySuit = MultiMapUtils.unmodifiableMultiValuedMap(cbs);
}
origin: webanno/webanno

public List<AnnotationFeature> getFeatures(String aLayerName)
{
  return features.get(aLayerName);
}

origin: webanno/webanno

public void add(VSpan aSpan)
{
  if (arcs.containsKey(aSpan.getVid()) || spans.containsKey(aSpan.getVid())) {
    throw new IllegalStateException("Annotation [" + aSpan.getVid() + "] already exists.");
  }
  
  spans.put(aSpan.getVid(), aSpan);
  annotationLayers.put(aSpan.getLayer().getId(), aSpan.getLayer());
  spansByLayer.put(aSpan.getLayer().getId(), aSpan);
}

org.apache.commons.collections4ListValuedMap

Javadoc

Defines a map that holds a list of values against each key.

A ListValuedMap is a Map with slightly different semantics:

  • Putting a value into the map will add the value to a List at that key.
  • Getting a value will return a List, holding all the values put to that key.

Most used methods

  • put
  • get
    Gets the list of values associated with the specified key. This method will return an empty list if
  • removeMapping
  • containsKey
  • keySet
  • values

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getExternalFilesDir (Context)
  • findViewById (Activity)
  • getSystemService (Context)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Best IntelliJ 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