Top Description Inners Fields Constructors Methods
rx.internal.operators

public final Class OperatorToObservableSortedList<T>

extends Object
implements Observable.Operator<List<T>, T>
Class Inheritance
All Implemented Interfaces
rx.Observable.Operator, rx.functions.Func1, rx.functions.Function
Type Parameters
<T>
the type of the items emitted by the source and the resulting Observables
Imports
java.util.*, rx.Observable.Operator, .Subscriber, rx.exceptions.Exceptions, rx.functions.Func2, rx.internal.producers.SingleDelayedProducer

Return an Observable that emits the items emitted by the source Observable, in a sorted order (each item emitted by the Observable must implement Comparable with respect to all other items in the sequence, or you must pass in a sort function).

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
private static final Comparator<T>
pack-priv final int
pack-priv final Comparator<? super T>

Constructor Summary

AccessConstructor and Description
public
OperatorToObservableSortedList(int initialCapacity)

public
OperatorToObservableSortedList(final Func2<? super T, ? super T, Integer> sortFunction, int initialCapacity)

Method Summary

Modifier and TypeMethod and Description
public Subscriber<? super T>
call(final Subscriber<? super List<T>> child)

Implements rx.functions.Func1.call.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_SORT_FUNCTIONback to summary
private static final Comparator<T> DEFAULT_SORT_FUNCTION
Annotations
@SuppressWarnings:rawtypes
initialCapacityback to summary
pack-priv final int initialCapacity
sortFunctionback to summary
pack-priv final Comparator<? super T> sortFunction

Constructor Detail

OperatorToObservableSortedListback to summary
public OperatorToObservableSortedList(int initialCapacity)
Annotations
@SuppressWarnings:unchecked
OperatorToObservableSortedListback to summary
public OperatorToObservableSortedList(final Func2<? super T, ? super T, Integer> sortFunction, int initialCapacity)

Method Detail

callback to summary
public Subscriber<? super T> call(final Subscriber<? super List<T>> child)

Implements rx.functions.Func1.call.

Annotations
@Override
rx.internal.operators back to summary

pack-priv final Class OperatorToObservableSortedList.DefaultComparableFunction

extends Object
implements Comparator<Object>
Class Inheritance
  • java.lang.Object
  • rx.internal.operators.OperatorToObservableSortedList.DefaultComparableFunction
All Implemented Interfaces
java.util.Comparator

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public int
compare(Object
the first object to be compared.
t1
,
Object
the second object to be compared.
t2
)

Implements java.util.Comparator.compare.

Compares its two arguments for order.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

DefaultComparableFunctionback to summary
pack-priv DefaultComparableFunction()

Method Detail

compareback to summary
public int compare(Object t1, Object t2)

Implements java.util.Comparator.compare.

Doc from java.util.Comparator.compare.

Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

The implementor must ensure that signum(compare(x, y)) == -signum(compare(y, x)) for all x and y. (This implies that compare(x, y) must throw an exception if and only if compare(y, x) throws an exception.)

The implementor must also ensure that the relation is transitive: ((compare(x, y)>0) && (compare(y, z)>0)) implies compare(x, z)>0.

Finally, the implementor must ensure that compare(x, y)==0 implies that signum(compare(x, z))==signum(compare(y, z)) for all z.

Parameters
t1:Object

the first object to be compared.

t2:Object

the second object to be compared.

Returns:int

a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

Annotations
@SuppressWarnings:unchecked
@Override