IntTreePMap<V> withKeysChangedAbove(final int key, final int delta) { // TODO check preconditions of changeKeysAbove() // TODO make public? return withRoot( root.changeKeysAbove(key, delta) ); }
IntTreePMap<V> withKeysChangedBelow(final int key, final int delta) { // TODO check preconditions of changeKeysAbove() // TODO make public? return withRoot( root.changeKeysBelow(key, delta) ); }
public IntTreePMap<V> plusAll(final Map<? extends Integer, ? extends V> map) { IntTree<V> root = this.root; for(Entry<? extends Integer,? extends V> entry : map.entrySet()) root = root.plus(entry.getKey(), entry.getValue()); return withRoot(root); }
public IntTreePMap<V> minusAll(final Collection<?> keys) { IntTree<V> root = this.root; for(Object key : keys) if(key instanceof Integer) root = root.minus((Integer)key); return withRoot(root); } }
public IntTreePMap<V> plusAll(final Map<? extends Integer, ? extends V> map) { IntTree<V> root = this.root; for(Entry<? extends Integer,? extends V> entry : map.entrySet()) root = root.plus(entry.getKey(), entry.getValue()); return withRoot(root); }
IntTreePMap<V> withKeysChangedAbove(final int key, final int delta) { // TODO check preconditions of changeKeysAbove() // TODO make public? return withRoot( root.changeKeysAbove(key, delta) ); }
IntTreePMap<V> withKeysChangedBelow(final int key, final int delta) { // TODO check preconditions of changeKeysAbove() // TODO make public? return withRoot( root.changeKeysBelow(key, delta) ); }
public IntTreePMap<V> minusAll(final Collection<?> keys) { IntTree<V> root = this.root; for(Object key : keys) if(key instanceof Integer) root = root.minus((Integer)key); return withRoot(root); } }
public IntTreePMap<V> minus(final Object key) { if(!(key instanceof Integer)) return this; return withRoot( root.minus((Integer)key) ); }
public IntTreePMap<V> minus(final Object key) { if(!(key instanceof Integer)) return this; return withRoot( root.minus((Integer)key) ); }
public IntTreePMap<V> plus(final Integer key, final V value) { return withRoot( root.plus(key, value) ); }
public IntTreePMap<V> plus(final Integer key, final V value) { return withRoot( root.plus(key, value) ); }
public IntTreePMap<V> minusAll(final Collection<?> keys) { IntTree<V> root = this.root; for(Object key : keys) if(key instanceof Integer) root = root.minus((Integer)key); return withRoot(root); } }
IntTreePMap<V> withKeysChangedAbove(final int key, final int delta) { // TODO check preconditions of changeKeysAbove() // TODO make public? return withRoot( root.changeKeysAbove(key, delta) ); }
IntTreePMap<V> withKeysChangedBelow(final int key, final int delta) { // TODO check preconditions of changeKeysAbove() // TODO make public? return withRoot( root.changeKeysBelow(key, delta) ); }
public IntTreePMap<V> minusAll(final Collection<?> keys) { IntTree<V> root = this.root; for (Object key : keys) if (key instanceof Integer) root = root.minus((Integer) key); return withRoot(root); } }
IntTreePMap<V> withKeysChangedAbove(final int key, final int delta) { // TODO check preconditions of changeKeysAbove() // TODO make public? return withRoot(root.changeKeysAbove(key, delta)); }
IntTreePMap<V> withKeysChangedBelow(final int key, final int delta) { // TODO check preconditions of changeKeysAbove() // TODO make public? return withRoot(root.changeKeysBelow(key, delta)); }
public IntTreePMap<V> plusAll(final Map<? extends Integer, ? extends V> map) { IntTree<V> root = this.root; for (Entry<? extends Integer, ? extends V> entry : map.entrySet()) root = root.plus(entry.getKey(), entry.getValue()); return withRoot(root); }
public IntTreePMap<V> plusAll(final Map<? extends Integer, ? extends V> map) { IntTree<V> root = this.root; for(Entry<? extends Integer,? extends V> entry : map.entrySet()) root = root.plus(entry.getKey(), entry.getValue()); return withRoot(root); }