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); }
private XSSFName createAndStoreName(CTDefinedName ctName) { XSSFName name = new XSSFName(ctName, this); namedRanges.add(name); namedRangesByName.put(ctName.getName().toLowerCase(Locale.ENGLISH), name); return name; }
public void add(VComment aComment) { comments.put(aComment.getVid(), aComment); }
public void add(VComment aComment) { comments.put(aComment.getVid(), aComment); }
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); }
private XSSFName createAndStoreName(CTDefinedName ctName) { XSSFName name = new XSSFName(ctName, this); namedRanges.add(name); namedRangesByName.put(ctName.getName().toLowerCase(Locale.ENGLISH), name); return name; }
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); }
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); }
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); }
public void add(VArc aArc) { if (arcs.containsKey(aArc.getVid()) || spans.containsKey(aArc.getVid())) { throw new IllegalStateException("Annotation [" + aArc.getVid() + "] already exists."); } arcs.put(aArc.getVid(), aArc); annotationLayers.put(aArc.getLayer().getId(), aArc.getLayer()); arcsByLayer.put(aArc.getLayer().getId(), aArc); }
public void add(VArc aArc) { if (arcs.containsKey(aArc.getVid()) || spans.containsKey(aArc.getVid())) { throw new IllegalStateException("Annotation [" + aArc.getVid() + "] already exists."); } arcs.put(aArc.getVid(), aArc); annotationLayers.put(aArc.getLayer().getId(), aArc.getLayer()); arcsByLayer.put(aArc.getLayer().getId(), aArc); }
} else { map.put(definition.getRef(), definition); expansions.put(definition.getRef().getLocalPart(), definition.getRef());
@Benchmark public int groupByApacheUnmodifiable(Deck deck) { ListValuedMap<Suit, Card> cbs = MultiMapUtils.newListValuedHashMap(); deck.apacheCommonsDeckOfCardsAsList.getCards() .forEach(card -> cbs.put(card.getSuit(), card)); return MultiMapUtils.unmodifiableMultiValuedMap(cbs).size(); }
private void analyzeFeatures(AnnotationLayer aLayer, TypeSystem aTS, TypeDescription aTD, Optional<? extends LayerDetails> aDetails) { Type type = aTS.getType(aTD.getName()); for (FeatureDescription fd : aTD.getFeatures()) { Feature feat = type.getFeatureByBaseName(fd.getName()); // We do not need to set up built-in features if (isBuiltInFeature(feat)) { continue; } if (aDetails.isPresent() && aDetails.get().isHiddenFeature(feat)) { continue; } AnnotationFeature f = analyzeFeature(aTS, fd, feat); features.put(aLayer.getName(), f); } }
private void analyzeFeatures(AnnotationLayer aLayer, TypeSystem aTS, TypeDescription aTD, Optional<? extends LayerDetails> aDetails) { Type type = aTS.getType(aTD.getName()); for (FeatureDescription fd : aTD.getFeatures()) { Feature feat = type.getFeatureByBaseName(fd.getName()); // We do not need to set up built-in features if (isBuiltInFeature(feat)) { continue; } if (aDetails.isPresent() && aDetails.get().isHiddenFeature(feat)) { continue; } AnnotationFeature f = analyzeFeature(aTS, fd, feat); features.put(aLayer.getName(), f); } }