Class Collections

java.lang.Object
io.vavr.collection.Collections

final class Collections extends Object
Internal class, containing helpers.
  • Constructor Details

    • Collections

      Collections()
  • Method Details

    • areEqual

      static boolean areEqual(Iterable<?> iterable1, Iterable<?> iterable2)
    • asJava

      @GwtIncompatible static <T, C extends Seq<T>> C asJava(C source, Consumer<? super List<T>> action, JavaConverters.ChangePolicy changePolicy)
    • crossProduct

      static <T, S extends Seq<T>> Iterator<S> crossProduct(S empty, S seq, int power)
    • dropRightUntil

      static <T, S extends IndexedSeq<T>> S dropRightUntil(S seq, Predicate<? super T> predicate)
    • dropUntil

      static <T, S extends IndexedSeq<T>> S dropUntil(S seq, Predicate<? super T> predicate)
    • equals

      static <K, V> boolean equals(Map<K,V> source, Object object)
    • equals

      static <K, V> boolean equals(Multimap<K,V> source, Object object)
    • equals

      static <V> boolean equals(Seq<V> source, Object object)
    • equals

      static <V> boolean equals(Set<V> source, Object object)
    • fill

      static <T> Iterator<T> fill(int n, Supplier<? extends T> supplier)
    • fillObject

      static <T> Iterator<T> fillObject(int n, T element)
    • fill

      static <C extends Traversable<T>, T> C fill(int n, Supplier<? extends T> s, C empty, Function<T[],C> of)
    • fillObject

      static <C extends Traversable<T>, T> C fillObject(int n, T element, C empty, Function<T[],C> of)
    • groupBy

      static <T, C, R extends Iterable<T>> Map<C,R> groupBy(Traversable<T> source, Function<? super T,? extends C> classifier, Function<? super Iterable<T>,R> mapper)
    • groupBy

      private static <T, C> Set<Map.Entry<C,Collection<T>>> groupBy(Traversable<T> source, Function<? super T,? extends C> classifier)
    • hashOrdered

      static int hashOrdered(Iterable<?> iterable)
    • hashUnordered

      static int hashUnordered(Iterable<?> iterable)
    • hash

      private static int hash(Iterable<?> iterable, IntBinaryOperator accumulator)
    • indexOption

      static Option<Integer> indexOption(int index)
    • isEmpty

      static boolean isEmpty(Iterable<?> iterable)
    • isTraversableAgain

      static <T> boolean isTraversableAgain(Iterable<? extends T> iterable)
    • last

      static <T> T last(Traversable<T> source)
    • mapKeys

      static <K, V, K2, U extends Map<K2, V>> U mapKeys(Map<K,V> source, U zero, Function<? super K,? extends K2> keyMapper, BiFunction<? super V,? super V,? extends V> valueMerge)
    • partition

      static <C extends Traversable<T>, T> Tuple2<C,C> partition(C collection, Function<Iterable<T>,C> creator, Predicate<? super T> predicate)
    • removeAll

      static <C extends Traversable<T>, T> C removeAll(C source, Iterable<? extends T> elements)
    • reject

      static <C extends Traversable<T>, T> C reject(C source, Predicate<? super T> predicate)
    • removeAll

      static <C extends Traversable<T>, T> C removeAll(C source, T element)
    • retainAll

      static <C extends Traversable<T>, T> C retainAll(C source, Iterable<? extends T> elements)
    • reverseIterator

      static <T> Iterator<T> reverseIterator(Iterable<T> iterable)
    • reverseListIterator

      private static <T> Iterator<T> reverseListIterator(List<T> list)
    • rotateLeft

      static <T, C extends Seq<T>> C rotateLeft(C source, int n)
    • rotateRight

      static <T, C extends Seq<T>> C rotateRight(C source, int n)
    • scanLeft

      static <T, U, R extends Traversable<U>> R scanLeft(Traversable<? extends T> source, U zero, BiFunction<? super U,? super T,? extends U> operation, Function<Iterator<U>,R> finisher)
    • scanRight

      static <T, U, R extends Traversable<U>> R scanRight(Traversable<? extends T> source, U zero, BiFunction<? super T,? super U,? extends U> operation, Function<Iterator<U>,R> finisher)
    • sortBy

      static <T, U, R extends Seq<T>> R sortBy(Seq<? extends T> source, Comparator<? super U> comparator, Function<? super T,? extends U> mapper, Collector<T,?,R> collector)
    • shuffle

      static <T, S extends Seq<T>> S shuffle(S source, Function<? super Iterable<T>,S> ofAll)
    • subSequenceRangeCheck

      static void subSequenceRangeCheck(int beginIndex, int endIndex, int length)
    • tabulate

      static <T> Iterator<T> tabulate(int n, Function<? super Integer,? extends T> f)
    • tabulate

      static <C extends Traversable<T>, T> C tabulate(int n, Function<? super Integer,? extends T> f, C empty, Function<T[],C> of)
    • takeRightUntil

      static <T, S extends IndexedSeq<T>> S takeRightUntil(S seq, Predicate<? super T> predicate)
    • takeUntil

      static <T, S extends IndexedSeq<T>> S takeUntil(S seq, Predicate<? super T> predicate)
    • transpose

      static <T, U extends Seq<T>, V extends Seq<U>> V transpose(V matrix, Function<Iterable<U>,V> rowFactory, Function<T[],U> columnFactory)
    • transposeNonEmptyMatrix

      private static <T, U extends Seq<T>, V extends Seq<U>> V transposeNonEmptyMatrix(V matrix, Function<Iterable<U>,V> rowFactory, Function<T[],U> columnFactory)
    • withSize

      static <T> Collections.IterableWithSize<T> withSize(Iterable<? extends T> iterable)
    • withSizeTraversable

      private static <T> Collections.IterableWithSize<T> withSizeTraversable(Iterable<? extends T> iterable)