Closed
Description
I was looking through the Observable operators and wondering if now would be a good time to change the following methods to return Singles instead of Observables.
-
Single<Boolean> all(Predicate<? super T> predicate)
-
Single<Boolean> any(Predicate<? super T> predicate)
-
<U> Single<U> collect(Callable<? extends U> initialValueSupplier, BiConsumer<? super U, ? super T> collector)
-
<U> Single<U> collectInto(final U initialValue, BiConsumer<? super U, ? super T> collector)
-
Single<Boolean> contains(final Object o)
-
Single<Long> count()
-
Maybe<T> elementAt(long index)
-
Single<T> elementAt(long index, T defaultValue)
-
Maybe<T> firstElement()
-
Single<T> first(T defaultItem)
-
Completable ignoreElements()
-
Single<Boolean> isEmpty()
-
Maybe<T> lastElement()
-
Single<T> last(T defaultItem)
-
Maybe<T> reduce(BiFunction<T, T, T> reducer)
-
<R> Single<R> reduce(R seed, BiFunction<R, ? super T, R> reducer)
-
<R> Single<R> reduceWith(Callable<R> seedSupplier, BiFunction<R, ? super T, R> reducer)
-
Maybe<T> singleElement()
-
Single<T> single(T defaultItem)
-
Single<List<T>> toList()
-
Single<List<T>> toList(final int capacityHint)
-
<K> Single<Map<K, T>> toMap(final Function<? super T, ? extends K> keySelector)
-
<K, V> Single<Map<K, V>> toMap(final Function<? super T, ? extends K> keySelector, final Function<? super T, ? extends V> valueSelector)
-
<K> Single<Map<K, Collection<T>>> toMultimap(Function<? super T, ? extends K> keySelector)
-
<K, V> Single<Map<K, Collection<V>>> toMultimap(Function<? super T, ? extends K> keySelector, Function<? super T, ? extends V> valueSelector)
-
Single<List<T>> toSortedList()
-
Single<List<T>> toSortedList(final Comparator<? super T> comparator)
-
Single<List<T>> toSortedList(final Comparator<? super T> comparator, int capacityHint)
-
Single<List<T>> toSortedList(int capacityHint)
(These were removed from the API:)
Single<List<T>> takeLastBuffer(int count)
Single<List<T>> takeLastBuffer(int count, long time, TimeUnit unit)
Single<List<T>> takeLastBuffer(int count, long time, TimeUnit unit, Scheduler scheduler)
Single<List<T>> takeLastBuffer(long time, TimeUnit unit)
Single<List<T>> takeLastBuffer(long time, TimeUnit unit, Scheduler scheduler)