@Test public void testVector(){ Vector<Integer> ints = Vector.<Integer>empty().plus(1); assertThat(ints.get(0),equalTo(Option.some(1))); }
public Vector(BAMT.NestedArray<T> root,BAMT.ActiveTail<T> tail, int size) { this.root = root; this.tail = tail; this.size = size; }
Vector implements ImmutableList<T>,
                                  Serializable,
                                 Higher<vector,T> { public Vector(BAMT.NestedArray<T> root,BAMT.ActiveTail<T> tail, int size) { this.root = root; this.tail = tail; this.size = size; } }
Vector implements ImmutableList<T>,
                                  Serializable,
                                 Higher<vector,T> { public Vector(BAMT.NestedArray<T> root,BAMT.ActiveTail<T> tail, int size) { this.root = root; this.tail = tail; this.size = size; } Vector(BAMT.NestedArray<T> root,BAMT.ActiveTail<T> tail, int size); }
Vector implements ImmutableList<T>,
                                  Serializable,
                                 Higher<vector,T> { public Vector(BAMT.NestedArray<T> root,BAMT.ActiveTail<T> tail, int size) { this.root = root; this.tail = tail; this.size = size; } Vector(BAMT.NestedArray<T> root,BAMT.ActiveTail<T> tail, int size); @Override Vector<T> plusAll(Iterable<? extends T> list); @Override boolean containsValue(T value); @Override Vector<R> unitIterable(Iterable<R> it); static Vector<T> narrowK(final Higher<vector, T> list); static Higher<C2, Higher<vector,T>> widen2(Higher<C2, Vector<T>> list); @Override Vector<R> forEach4(Function<? super T, ? extends Iterable<R1>> iterable1, BiFunction<? super T, ? super R1, ? extends Iterable<R2>> iterable2, Function3<? super T, ? super R1, ? super R2, ? extends Iterable<R3>> iterable3, Function4<? super T, ? super R1, ? super R2, ? super R3, ? extends R> yieldingFunction); @Override Vector<R> forEach4(Function<? super T, ? extends Iterable<R1>> iterable1, BiFunction<? super T, ? super R1, ? extends Iterable<R2>> iterable2, Function3<? super T, ? super R1, ? super R2, ? extends Iterable<R3>> iterable3, Function4<? super T, ? super R1, ? super R2, ? super R3, Boolean> filterFunction, Function4<? super T, ? super R1, ? super R2, ? super R3, ? extends R> yieldingFunction); @Override Vector<R> forEach3(Function<? super T, ? extends Iterable<R1>> iterable1, BiFunction<? super T, ? super R1, ? extends Iterable<R2>> iterable2, Function3<? super T, ? super R1, ? super R2, ? extends R> yieldingFunction); @Override Vector<R> forEach3(Function<? super T, ? extends Iterable<R1>> iterable1, BiFunction<? super T, ? super R1, ? extends Iterable<R2>> iterable2, Function3<? super T, ? super R1, ? super R2, Boolean> filterFunction, Function3<? super T, ? super R1, ? super R2, ? extends R> yieldingFunction); @Override Vector<R> forEach2(Function<? super T, ? extends Iterable<R1>> iterable1, BiFunction<? super T, ? super R1, ? extends R> yieldingFunction); @Override Vector<R> forEach2(Function<? super T, ? extends Iterable<R1>> iterable1, BiFunction<? super T, ? super R1, Boolean> filterFunction, BiFunction<? super T, ? super R1, ? extends R> yieldingFunction); @Override Iterator<T> iterator(); @Override Vector<T> removeValue(T e); @Override Vector<T> removeAll(Iterable<? extends T> list); @Override Vector<T> removeAt(long i); @Override Vector<T> insertAt(int pos, T... values); @Override Vector<T> insertAt(int i, T e); @Override Vector<T> insertAt(int pos, Iterable<? extends T> values); @Override Vector<T> insertAt(int pos, ReactiveSeq<? extends T> values); Vector<T> plusAll(int i, Iterable<? extends T> values); static Vector<T> empty(); static Vector<T> fill(T t, int max); static Vector<T> unfold(final U seed, final Function<? super U, Option<Tuple2<T, U>>> unfolder); static Vector<T> iterate(final T seed, Predicate<? super T> pred, final UnaryOperator<T> f); static Vector<T> iterate(final T seed, final UnaryOperator<T> f,int max); static Tuple2<Vector<T>, Vector<U>> unzip(final Vector<Tuple2<T, U>> sequence); static Vector<T> generate(Supplier<T> s, int max); @Deprecated static Vector<T> generate(Generator<T> s); static Vector<Integer> range(final int start, final int end); static Vector<Integer> range(final int start, final int step, final int end); static Vector<Long> rangeLong(final long start, final long step, final long end); static Vector<Long> rangeLong(final long start, final long end); static Vector<T> fromStream(Stream<T> it); static Vector<T> fromIterator(Iterator<T> it); static Vector<T> fromIterable(Iterable<T> it); static Vector<T> of(T... value); Vector<T> removeFirst(Predicate<? super T> pred); ReactiveSeq<T> stream(); Vector<T> filter(Predicate<? super T> pred); Vector<R> map(Function<? super T, ? extends R> fn); @Override R fold(Function<? super Some<T>, ? extends R> fn1, Function<? super None<T>, ? extends R> fn2); @Override Vector<T> onEmpty(T value); @Override Vector<T> onEmptyGet(Supplier<? extends T> supplier); @Override Vector<T> replaceFirst(T currentElement, T newElement); @Override Vector<U> ofType(Class<? extends U> type); @Override Vector<T> filterNot(Predicate<? super T> predicate); @Override Vector<T> notNull(); @Override Vector<T> peek(Consumer<? super T> c); @Override Vector<T> removeStream(Stream<? extends T> stream); @Override Vector<T> retainAll(Iterable<? extends T> it); @Override Vector<T> retainStream(Stream<? extends T> stream); @Override Vector<T> retainAll(T... values); @Override Vector<ReactiveSeq<T>> permutations(); @Override Vector<ReactiveSeq<T>> combinations(int size); @Override Vector<ReactiveSeq<T>> combinations(); @Override Vector<R> zip(BiFunction<? super T, ? super T2, ? extends R> fn, Publisher<? extends T2> publisher); @Override Vector<R> zipWithStream(Stream<? extends U> other, BiFunction<? super T, ? super U, ? extends R> zipper); @Override Vector<Tuple2<T, U>> zipWithPublisher(Publisher<? extends U> other); @Override Vector<Tuple2<T, U>> zip(Iterable<? extends U> other); @Override Vector<R> zip3(Iterable<? extends S> second, Iterable<? extends U> third, Function3<? super T, ? super S, ? super U, ? extends R> fn3); @Override Vector<R> zip4(Iterable<? extends T2> second, Iterable<? extends T3> third, Iterable<? extends T4> fourth, Function4<? super T, ? super T2, ? super T3, ? super T4, ? extends R> fn); @Override Vector<T> combine(BiPredicate<? super T, ? super T> predicate, BinaryOperator<T> op); @Override Vector<T> combine(Monoid<T> op, BiPredicate<? super T, ? super T> predicate); @Override Vector<T> cycle(long times); @Override Vector<T> cycle(Monoid<T> m, long times); @Override Vector<T> cycleWhile(Predicate<? super T> predicate); @Override Vector<T> cycleUntil(Predicate<? super T> predicate); @Override Vector<R> zip(Iterable<? extends U> other, BiFunction<? super T, ? super U, ? extends R> zipper); @Override Vector<Tuple3<T, S, U>> zip3(Iterable<? extends S> second, Iterable<? extends U> third); @Override Vector<Tuple4<T, T2, T3, T4>> zip4(Iterable<? extends T2> second, Iterable<? extends T3> third, Iterable<? extends T4> fourth); @Override Vector<Tuple2<T, Long>> zipWithIndex(); @Override Vector<Seq<T>> sliding(int windowSize); @Override Vector<Seq<T>> sliding(int windowSize, int increment); @Override Vector<C> grouped(int size, Supplier<C> supplier); @Override Vector<Vector<T>> groupedUntil(Predicate<? super T> predicate); @Override Vector<Vector<T>> groupedUntil(BiPredicate<Vector<? super T>, ? super T> predicate); @Override Vector<Tuple2<T, U>> zipWithStream(Stream<? extends U> other); @Override Vector<Vector<T>> groupedWhile(Predicate<? super T> predicate); @Override Vector<C> groupedWhile(Predicate<? super T> predicate, Supplier<C> factory); @Override Vector<C> groupedUntil(Predicate<? super T> predicate, Supplier<C> factory); @Override Vector<Vector<T>> grouped(int groupSize); @Override Vector<T> distinct(); @Override Vector<T> scanLeft(Monoid<T> monoid); @Override Vector<U> scanLeft(U seed, BiFunction<? super U, ? super T, ? extends U> function); @Override Vector<T> scanRight(Monoid<T> monoid); @Override Vector<U> scanRight(U identity, BiFunction<? super T, ? super U, ? extends U> combiner); @Override Vector<T> sorted(); @Override Vector<T> sorted(Comparator<? super T> c); @Override Vector<T> takeWhile(Predicate<? super T> p); @Override Vector<T> dropWhile(Predicate<? super T> p); @Override Vector<T> takeUntil(Predicate<? super T> p); @Override Vector<T> dropUntil(Predicate<? super T> p); @Override Vector<T> intersperse(T value); @Override Vector<T> shuffle(); @Override Vector<T> shuffle(Random random); @Override Vector<T> slice(long from, long to); @Override Vector<T> prependStream(Stream<? extends T> stream); @Override Vector<T> appendAll(T... values); @Override Vector<T> prependAll(T... values); @Override Vector<T> deleteBetween(int start, int end); @Override Vector<T> insertStreamAt(int pos, Stream<T> stream); @Override Vector<T> sorted(Function<? super T, ? extends U> function); @Override Vector<T> updateAt(int pos, T value); @Override ImmutableList<T> onEmptySwitch(Supplier<? extends ImmutableList<T>> supplier); Vector<R> flatMap(Function<? super T, ? extends ImmutableList<? extends R>> fn); @Override Vector<R> mergeMap(Function<? super T, ? extends Publisher<? extends R>> fn); @Override Vector<R> mergeMap(int maxConcurecy, Function<? super T, ? extends Publisher<? extends R>> fn); @Override Vector<R> concatMap(Function<? super T, ? extends Iterable<? extends R>> fn); Either<Integer,Vector<T>> set(int pos, T value); Either<Integer,Vector<T>> delete(int pos); int size(); @Override boolean isEmpty(); Vector<T> plus(T t); @Override Vector<R> unitStream(Stream<R> stream); @Override Vector<T> emptyUnit(); Vector<T> takeRight(int num); Vector<T> dropRight(int num); @Override Vector<T> drop(long num); @Override Vector<T> take(long num); @Override Vector<T> prepend(T value); @Override Vector<T> prependAll(Iterable<? extends T> value); Vector<T> append(T value); @Override Vector<T> appendAll(Iterable<? extends T> value); Vector<T> subList(int start, int end); @Override ImmutableList<T> reverse(); Option<T> get(int pos); @Override T getOrElse(int pos, T alt); @Override T getOrElseGet(int pos, Supplier<? extends T> alt); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); static Vector<R> tailRec(T initial, Function<? super T, ? extends Vector<? extends Either<T, R>>> fn); static Higher<vector, T> widen(Vector<T> narrow); }
Vector implements ImmutableList<T>,
                                  Serializable,
                                 Higher<vector,T> { public Vector(BAMT.NestedArray<T> root,BAMT.ActiveTail<T> tail, int size) { this.root = root; this.tail = tail; this.size = size; } Vector(BAMT.NestedArray<T> root,BAMT.ActiveTail<T> tail, int size); @Override Vector<T> plusAll(Iterable<? extends T> list); @Override boolean containsValue(T value); @Override Vector<R> unitIterable(Iterable<R> it); static Vector<T> narrowK(final Higher<vector, T> list); static Higher<C2, Higher<vector,T>> widen2(Higher<C2, Vector<T>> list); @Override Vector<R> forEach4(Function<? super T, ? extends Iterable<R1>> iterable1, BiFunction<? super T, ? super R1, ? extends Iterable<R2>> iterable2, Function3<? super T, ? super R1, ? super R2, ? extends Iterable<R3>> iterable3, Function4<? super T, ? super R1, ? super R2, ? super R3, ? extends R> yieldingFunction); @Override Vector<R> forEach4(Function<? super T, ? extends Iterable<R1>> iterable1, BiFunction<? super T, ? super R1, ? extends Iterable<R2>> iterable2, Function3<? super T, ? super R1, ? super R2, ? extends Iterable<R3>> iterable3, Function4<? super T, ? super R1, ? super R2, ? super R3, Boolean> filterFunction, Function4<? super T, ? super R1, ? super R2, ? super R3, ? extends R> yieldingFunction); @Override Vector<R> forEach3(Function<? super T, ? extends Iterable<R1>> iterable1, BiFunction<? super T, ? super R1, ? extends Iterable<R2>> iterable2, Function3<? super T, ? super R1, ? super R2, ? extends R> yieldingFunction); @Override Vector<R> forEach3(Function<? super T, ? extends Iterable<R1>> iterable1, BiFunction<? super T, ? super R1, ? extends Iterable<R2>> iterable2, Function3<? super T, ? super R1, ? super R2, Boolean> filterFunction, Function3<? super T, ? super R1, ? super R2, ? extends R> yieldingFunction); @Override Vector<R> forEach2(Function<? super T, ? extends Iterable<R1>> iterable1, BiFunction<? super T, ? super R1, ? extends R> yieldingFunction); @Override Vector<R> forEach2(Function<? super T, ? extends Iterable<R1>> iterable1, BiFunction<? super T, ? super R1, Boolean> filterFunction, BiFunction<? super T, ? super R1, ? extends R> yieldingFunction); @Override Iterator<T> iterator(); @Override Vector<T> removeValue(T e); @Override Vector<T> removeAll(Iterable<? extends T> list); @Override Vector<T> removeAt(long i); @Override Vector<T> insertAt(int pos, T... values); @Override Vector<T> insertAt(int i, T e); @Override Vector<T> insertAt(int pos, Iterable<? extends T> values); @Override Vector<T> insertAt(int pos, ReactiveSeq<? extends T> values); Vector<T> plusAll(int i, Iterable<? extends T> values); static Vector<T> empty(); static Vector<T> fill(T t, int max); static Vector<T> unfold(final U seed, final Function<? super U, Option<Tuple2<T, U>>> unfolder); static Vector<T> iterate(final T seed, Predicate<? super T> pred, final UnaryOperator<T> f); static Vector<T> iterate(final T seed, final UnaryOperator<T> f,int max); static Tuple2<Vector<T>, Vector<U>> unzip(final Vector<Tuple2<T, U>> sequence); static Vector<T> generate(Supplier<T> s, int max); @Deprecated static Vector<T> generate(Generator<T> s); static Vector<Integer> range(final int start, final int end); static Vector<Integer> range(final int start, final int step, final int end); static Vector<Long> rangeLong(final long start, final long step, final long end); static Vector<Long> rangeLong(final long start, final long end); static Vector<T> fromStream(Stream<T> it); static Vector<T> fromIterator(Iterator<T> it); static Vector<T> fromIterable(Iterable<T> it); static Vector<T> of(T... value); Vector<T> removeFirst(Predicate<? super T> pred); ReactiveSeq<T> stream(); Vector<T> filter(Predicate<? super T> pred); Vector<R> map(Function<? super T, ? extends R> fn); @Override R fold(Function<? super Some<T>, ? extends R> fn1, Function<? super None<T>, ? extends R> fn2); @Override Vector<T> onEmpty(T value); @Override Vector<T> onEmptyGet(Supplier<? extends T> supplier); @Override Vector<T> replaceFirst(T currentElement, T newElement); @Override Vector<U> ofType(Class<? extends U> type); @Override Vector<T> filterNot(Predicate<? super T> predicate); @Override Vector<T> notNull(); @Override Vector<T> peek(Consumer<? super T> c); @Override Vector<T> removeStream(Stream<? extends T> stream); @Override Vector<T> retainAll(Iterable<? extends T> it); @Override Vector<T> retainStream(Stream<? extends T> stream); @Override Vector<T> retainAll(T... values); @Override Vector<ReactiveSeq<T>> permutations(); @Override Vector<ReactiveSeq<T>> combinations(int size); @Override Vector<ReactiveSeq<T>> combinations(); @Override Vector<R> zip(BiFunction<? super T, ? super T2, ? extends R> fn, Publisher<? extends T2> publisher); @Override Vector<R> zipWithStream(Stream<? extends U> other, BiFunction<? super T, ? super U, ? extends R> zipper); @Override Vector<Tuple2<T, U>> zipWithPublisher(Publisher<? extends U> other); @Override Vector<Tuple2<T, U>> zip(Iterable<? extends U> other); @Override Vector<R> zip3(Iterable<? extends S> second, Iterable<? extends U> third, Function3<? super T, ? super S, ? super U, ? extends R> fn3); @Override Vector<R> zip4(Iterable<? extends T2> second, Iterable<? extends T3> third, Iterable<? extends T4> fourth, Function4<? super T, ? super T2, ? super T3, ? super T4, ? extends R> fn); @Override Vector<T> combine(BiPredicate<? super T, ? super T> predicate, BinaryOperator<T> op); @Override Vector<T> combine(Monoid<T> op, BiPredicate<? super T, ? super T> predicate); @Override Vector<T> cycle(long times); @Override Vector<T> cycle(Monoid<T> m, long times); @Override Vector<T> cycleWhile(Predicate<? super T> predicate); @Override Vector<T> cycleUntil(Predicate<? super T> predicate); @Override Vector<R> zip(Iterable<? extends U> other, BiFunction<? super T, ? super U, ? extends R> zipper); @Override Vector<Tuple3<T, S, U>> zip3(Iterable<? extends S> second, Iterable<? extends U> third); @Override Vector<Tuple4<T, T2, T3, T4>> zip4(Iterable<? extends T2> second, Iterable<? extends T3> third, Iterable<? extends T4> fourth); @Override Vector<Tuple2<T, Long>> zipWithIndex(); @Override Vector<Seq<T>> sliding(int windowSize); @Override Vector<Seq<T>> sliding(int windowSize, int increment); @Override Vector<C> grouped(int size, Supplier<C> supplier); @Override Vector<Vector<T>> groupedUntil(Predicate<? super T> predicate); @Override Vector<Vector<T>> groupedUntil(BiPredicate<Vector<? super T>, ? super T> predicate); @Override Vector<Tuple2<T, U>> zipWithStream(Stream<? extends U> other); @Override Vector<Vector<T>> groupedWhile(Predicate<? super T> predicate); @Override Vector<C> groupedWhile(Predicate<? super T> predicate, Supplier<C> factory); @Override Vector<C> groupedUntil(Predicate<? super T> predicate, Supplier<C> factory); @Override Vector<Vector<T>> grouped(int groupSize); @Override Vector<T> distinct(); @Override Vector<T> scanLeft(Monoid<T> monoid); @Override Vector<U> scanLeft(U seed, BiFunction<? super U, ? super T, ? extends U> function); @Override Vector<T> scanRight(Monoid<T> monoid); @Override Vector<U> scanRight(U identity, BiFunction<? super T, ? super U, ? extends U> combiner); @Override Vector<T> sorted(); @Override Vector<T> sorted(Comparator<? super T> c); @Override Vector<T> takeWhile(Predicate<? super T> p); @Override Vector<T> dropWhile(Predicate<? super T> p); @Override Vector<T> takeUntil(Predicate<? super T> p); @Override Vector<T> dropUntil(Predicate<? super T> p); @Override Vector<T> intersperse(T value); @Override Vector<T> shuffle(); @Override Vector<T> shuffle(Random random); @Override Vector<T> slice(long from, long to); @Override Vector<T> prependStream(Stream<? extends T> stream); @Override Vector<T> appendAll(T... values); @Override Vector<T> prependAll(T... values); @Override Vector<T> deleteBetween(int start, int end); @Override Vector<T> insertStreamAt(int pos, Stream<T> stream); @Override Vector<T> sorted(Function<? super T, ? extends U> function); @Override Vector<T> updateAt(int pos, T value); @Override ImmutableList<T> onEmptySwitch(Supplier<? extends ImmutableList<T>> supplier); Vector<R> flatMap(Function<? super T, ? extends ImmutableList<? extends R>> fn); @Override Vector<R> mergeMap(Function<? super T, ? extends Publisher<? extends R>> fn); @Override Vector<R> mergeMap(int maxConcurecy, Function<? super T, ? extends Publisher<? extends R>> fn); @Override Vector<R> concatMap(Function<? super T, ? extends Iterable<? extends R>> fn); Either<Integer,Vector<T>> set(int pos, T value); Either<Integer,Vector<T>> delete(int pos); int size(); @Override boolean isEmpty(); Vector<T> plus(T t); @Override Vector<R> unitStream(Stream<R> stream); @Override Vector<T> emptyUnit(); Vector<T> takeRight(int num); Vector<T> dropRight(int num); @Override Vector<T> drop(long num); @Override Vector<T> take(long num); @Override Vector<T> prepend(T value); @Override Vector<T> prependAll(Iterable<? extends T> value); Vector<T> append(T value); @Override Vector<T> appendAll(Iterable<? extends T> value); Vector<T> subList(int start, int end); @Override ImmutableList<T> reverse(); Option<T> get(int pos); @Override T getOrElse(int pos, T alt); @Override T getOrElseGet(int pos, Supplier<? extends T> alt); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); static Vector<R> tailRec(T initial, Function<? super T, ? extends Vector<? extends Either<T, R>>> fn); static Higher<vector, T> widen(Vector<T> narrow);  }