Package rx.internal.operators
Class OperatorTake<T>
- java.lang.Object
-
- rx.internal.operators.OperatorTake<T>
-
- Type Parameters:
T
- the value type
- All Implemented Interfaces:
Func1<Subscriber<? super T>,Subscriber<? super T>>
,Function
,Observable.Operator<T,T>
public final class OperatorTake<T> extends java.lang.Object implements Observable.Operator<T,T>
AnObservable
that emits the firstnum
items emitted by the sourceObservable
.You can choose to pay attention only to the first
num
items emitted by anObservable
by using thetake
operator. This operator returns anObservable
that will invoke a subscriber'sonNext
function a maximum ofnum
times before invokingonCompleted
.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int
limit
-
Constructor Summary
Constructors Constructor Description OperatorTake(int limit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Subscriber<? super T>
call(Subscriber<? super T> child)
-
-
-
Method Detail
-
call
public Subscriber<? super T> call(Subscriber<? super T> child)
- Specified by:
call
in interfaceFunc1<Subscriber<? super T>,Subscriber<? super T>>
-
-