/** {@inheritDoc} */ @SuppressWarnings({"RedundantCast"}) public boolean increment( K key ) { //noinspection RedundantCast return adjustValue( key, (int)1 ); }
private void decrCoords(DimWithPos key) { int time = getTimeInCoords(key); if(time <= 0) removeQueue.add(key); else coordsToCheck.adjustValue(key, -1); }
/** {@inheritDoc} */ @SuppressWarnings({"RedundantCast"}) public boolean increment( K key ) { //noinspection RedundantCast return adjustValue( key, (int)1 ); }
/** {@inheritDoc} */ @Override public boolean increment( K key ) { //noinspection RedundantCast return adjustValue( key, (int)1 ); }
/** {@inheritDoc} */ @SuppressWarnings({"RedundantCast"}) public boolean increment( K key ) { //noinspection RedundantCast return adjustValue( key, (int)1 ); }
/** {@inheritDoc} */ @SuppressWarnings({"RedundantCast"}) public boolean increment( K key ) { //noinspection RedundantCast return adjustValue( key, (int)1 ); }
/** See {@link gnu.trove.map.hash.TObjectIntHashMap#adjustValue(Object, int)} */ public boolean adjustValue(K key, int amount) { return delegate.adjustValue(key, amount); }
/** See {@link gnu.trove.map.hash.TObjectIntHashMap#adjustValue(Object, int)} */ public boolean adjustValue(K key, int amount) { return delegate.adjustValue(key, amount); }
/** * Replaces the value attached with key <i>k</i> with <i>v</i>. * @param k the key * @param v the value */ public void replace(E k, int v) { int cValue = map.get(k); assert cValue != NO_ENTRY; int amount = v - cValue; if(amount != 0) { map.adjustValue(k, amount); rmap.remove(cValue); rmap.put(v, k); } assert rmap.get(map.get(k)) == k; assert map.get(rmap.get(v)) == v; }
counts.adjustValue(yRoot, counts.remove(xRoot)); counts.adjustValue(xRoot, counts.remove(yRoot)); yNode.parent = xRoot; xNode.rank++; counts.adjustValue(xRoot, counts.remove(yRoot)); return xRoot;
public void addFollower(Token token, int counts) { if (token.getType() == Token.TYPE_VARIANT) { Variant variant = (Variant) token; if (followers.get(variant) > 0) followers.adjustValue(variant, counts); else followers.put(variant, counts); totalFollowerOccurrences += counts; } else { followedByDelimiter += counts; } }
public void addFollower(Token token, int counts) { if (token.getType() == Token.TYPE_VARIANT) { Variant variant = (Variant) token; if (followers.get(variant) > 0) followers.adjustValue(variant, counts); else followers.put(variant, counts); totalFollowerOccurrences += counts; } else { followedByDelimiter += counts; } }
protected void merge(Term other) { if (other == this) return; this.score = this.score + other.score; this.totalOccurrences = this.totalOccurrences + other.totalOccurrences; TObjectIntIterator<Variant> iter = other.variants.iterator(); while (iter.hasNext()) { iter.advance(); Variant key = iter.key(); int value = iter.value(); if (this.variants.containsKey(key)) this.variants.adjustValue(key, value); else this.variants.put(key, value); key.replaceTerm(this); } }
protected void merge(Term other) { if (other == this) return; this.score = this.score + other.score; this.totalOccurrences = this.totalOccurrences + other.totalOccurrences; TObjectIntIterator<Variant> iter = other.variants.iterator(); while (iter.hasNext()) { iter.advance(); Variant key = iter.key(); int value = iter.value(); if (this.variants.containsKey(key)) this.variants.adjustValue(key, value); else this.variants.put(key, value); key.replaceTerm(this); } }