public TreePVector<E> plusAll(int i, final Collection<? extends E> list) { if(i<0 || i>size()) throw new IndexOutOfBoundsException(); if(list.size()==0) return this; IntTreePMap<E> map = this.map.withKeysChangedAbove(i, list.size()); for(E e : list) map = map.plus(i++, e); return new TreePVector<E>( map ); }
public PVector<E> with(final int i, final E e) { if(i<0 || i>=size()) throw new IndexOutOfBoundsException(); IntTreePMap<E> map = this.map.plus(i, e); if(map==this.map) return this; return new TreePVector<E>( map ); } }
public PVector<E> with(final int i, final E e) { if(i<0 || i>=size()) throw new IndexOutOfBoundsException(); IntTreePMap<E> map = this.map.plus(i, e); if(map==this.map) return this; return new TreePVector<E>( map ); } }
public TreePVector<E> plusAll(int i, final Collection<? extends E> list) { if(i<0 || i>size()) throw new IndexOutOfBoundsException(); if(list.size()==0) return this; IntTreePMap<E> map = this.map.withKeysChangedAbove(i, list.size()); for(E e : list) map = map.plus(i++, e); return new TreePVector<E>( map ); }
public TreePVector<E> plus(final int i, final E e) { if(i<0 || i>size()) throw new IndexOutOfBoundsException(); return new TreePVector<E>( map.withKeysChangedAbove(i,1).plus(i,e) ); }
public TreePVector<E> plus(final E e) { return new TreePVector<E>( map.plus(size(), e) ); }
public TreePVector<E> plus(final E e) { return new TreePVector<E>( map.plus(size(), e) ); }
public TreePVector<E> minus(final int i) { if(i<0 || i>=size()) throw new IndexOutOfBoundsException(); return new TreePVector<E>( map.minus(i).withKeysChangedAbove(i,-1) ); }
public TreePVector<E> plus(final int i, final E e) { if(i<0 || i>size()) throw new IndexOutOfBoundsException(); return new TreePVector<E>( map.withKeysChangedAbove(i,1).plus(i,e) ); }
public TreePVector<E> minus(final int i) { if(i<0 || i>=size()) throw new IndexOutOfBoundsException(); return new TreePVector<E>( map.minus(i).withKeysChangedAbove(i,-1) ); }
public TreePVector<E> plusAll(int i, final Collection<? extends E> list) { if (i < 0 || i > size()) throw new IndexOutOfBoundsException(); if (list.size() == 0) return this; IntTreePMap<E> map = this.map.withKeysChangedAbove(i, list.size()); for (E e : list) map = map.plus(i++, e); return new TreePVector<E>(map); }
public PVector<E> with(final int i, final E e) { if(i<0 || i>=size()) throw new IndexOutOfBoundsException(); IntTreePMap<E> map = this.map.plus(i, e); if(map==this.map) return this; return new TreePVector<E>( map ); } }
public PVector<E> with(final int i, final E e) { if (i < 0 || i >= size()) throw new IndexOutOfBoundsException(); IntTreePMap<E> map = this.map.plus(i, e); if (map == this.map) return this; return new TreePVector<E>(map); } }
public TreePVector<E> plusAll(int i, final Collection<? extends E> list) { if(i<0 || i>size()) throw new IndexOutOfBoundsException(); if(list.size()==0) return this; IntTreePMap<E> map = this.map.withKeysChangedAbove(i, list.size()); for(E e : list) map = map.plus(i++, e); return new TreePVector<E>( map ); }
public TreePVector<E> plus(final E e) { return new TreePVector<E>(map.plus(size(), e)); }
public TreePVector<E> minus(final int i) { if(i<0 || i>=size()) throw new IndexOutOfBoundsException(); return new TreePVector<E>( map.minus(i).withKeysChangedAbove(i,-1) ); }
public TreePVector<E> plus(final E e) { return new TreePVector<E>( map.plus(size(), e) ); }
public TreePVector<E> plus(final int i, final E e) { if (i < 0 || i > size()) throw new IndexOutOfBoundsException(); return new TreePVector<E>(map.withKeysChangedAbove(i, 1).plus(i, e)); }
public TreePVector<E> minus(final int i) { if (i < 0 || i >= size()) throw new IndexOutOfBoundsException(); return new TreePVector<E>(map.minus(i).withKeysChangedAbove(i, -1)); }
public TreePVector<E> plus(final int i, final E e) { if(i<0 || i>size()) throw new IndexOutOfBoundsException(); return new TreePVector<E>( map.withKeysChangedAbove(i,1).plus(i,e) ); }