本文整理汇总了Java中rx.annotations.Beta类的典型用法代码示例。如果您正苦于以下问题:Java Beta类的具体用法?Java Beta怎么用?Java Beta使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Beta类属于rx.annotations包,在下文中一共展示了Beta类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getValues
import rx.annotations.Beta; //导入依赖的package包/类
@Beta
public T[] getValues(T[] a) {
Object o = this.state.getLatest();
if (this.nl.isNext(o)) {
if (a.length == 0) {
a = (Object[]) ((Object[]) Array.newInstance(a.getClass().getComponentType(), 1));
}
a[0] = this.nl.getValue(o);
if (a.length > 1) {
a[1] = null;
}
} else if (a.length > 0) {
a[0] = null;
}
return a;
}
示例2: flatMap
import rx.annotations.Beta; //导入依赖的package包/类
@Beta
public final <R> Observable<R> flatMap(Func1<? super T, ? extends Observable<? extends R>> func, int maxConcurrent) {
if (getClass() == ScalarSynchronousObservable.class) {
return ((ScalarSynchronousObservable) this).scalarFlatMap(func);
}
return merge(map(func), maxConcurrent);
}
示例3: getThrowable
import rx.annotations.Beta; //导入依赖的package包/类
@Beta
public Throwable getThrowable() {
NotificationLite<T> nl = this.ssm.nl;
Object o = this.ssm.getLatest();
if (nl.isError(o)) {
return nl.getError(o);
}
return null;
}
示例4: getValues
import rx.annotations.Beta; //导入依赖的package包/类
@Beta
public Object[] getValues() {
T[] r = getValues(EMPTY_ARRAY);
if (r == EMPTY_ARRAY) {
return new Object[0];
}
return r;
}
示例5: getValue
import rx.annotations.Beta; //导入依赖的package包/类
@Beta
public T getValue() {
Object v = this.lastValue;
if (this.nl.isError(this.state.getLatest()) || !this.nl.isNext(v)) {
return null;
}
return this.nl.getValue(v);
}
示例6: getThrowable
import rx.annotations.Beta; //导入依赖的package包/类
@Beta
public Throwable getThrowable() {
Object o = this.state.getLatest();
if (this.nl.isError(o)) {
return this.nl.getError(o);
}
return null;
}
示例7: getValue
import rx.annotations.Beta; //导入依赖的package包/类
@Beta
public T getValue() {
Object o = this.state.getLatest();
if (this.nl.isNext(o)) {
return this.nl.getValue(o);
}
return null;
}
示例8: autoConnect
import rx.annotations.Beta; //导入依赖的package包/类
@Beta
public Observable<T> autoConnect(int numberOfSubscribers, Action1<? super Subscription> connection) {
if (numberOfSubscribers > 0) {
return create(new OnSubscribeAutoConnect(this, numberOfSubscribers, connection));
}
connect(connection);
return this;
}
示例9: handleOnNextValueRendering
import rx.annotations.Beta; //导入依赖的package包/类
@Beta
public final String handleOnNextValueRendering(Object item) {
try {
return render(item);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
return item.getClass().getName() + ERROR_IN_RENDERING_SUFFIX;
} catch (Throwable t) {
Exceptions.throwIfFatal(t);
return item.getClass().getName() + ERROR_IN_RENDERING_SUFFIX;
}
}
示例10: create
import rx.annotations.Beta; //导入依赖的package包/类
@Beta
public static <S, T> Observable<T> create(SyncOnSubscribe<S, T> syncOnSubscribe) {
return new Observable(hook.onCreate(syncOnSubscribe));
}
示例11: toSingle
import rx.annotations.Beta; //导入依赖的package包/类
@Beta
public Single<T> toSingle() {
return new Single(OnSubscribeSingle.create(this));
}
示例12: fromCallable
import rx.annotations.Beta; //导入依赖的package包/类
@Beta
public static <T> Observable<T> fromCallable(Callable<? extends T> func) {
return create(new OnSubscribeFromCallable(func));
}
示例13: doOnRequest
import rx.annotations.Beta; //导入依赖的package包/类
@Beta
public final Observable<T> doOnRequest(Action1<Long> onRequest) {
return lift(new OperatorDoOnRequest(onRequest));
}
示例14: flatMapIterable
import rx.annotations.Beta; //导入依赖的package包/类
@Beta
public final <R> Observable<R> flatMapIterable(Func1<? super T, ? extends Iterable<? extends R>> collectionSelector, int maxConcurrent) {
return OnSubscribeFlattenIterable.createFrom(this, collectionSelector, maxConcurrent);
}
示例15: hasThrowable
import rx.annotations.Beta; //导入依赖的package包/类
@Beta
public boolean hasThrowable() {
return this.ssm.nl.isError(this.ssm.getLatest());
}