本文整理汇总了Java中io.reactivex.Observable.wrap方法的典型用法代码示例。如果您正苦于以下问题:Java Observable.wrap方法的具体用法?Java Observable.wrap怎么用?Java Observable.wrap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类io.reactivex.Observable
的用法示例。
在下文中一共展示了Observable.wrap方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: observableChanges
import io.reactivex.Observable; //导入方法依赖的package包/类
public Observable<Map<K, V>> observableChanges() {
return Observable.wrap(items);
}
示例2: onPut
import io.reactivex.Observable; //导入方法依赖的package包/类
private Observable<Map.Entry<K, V>> onPut() {
return Observable.wrap(put);
}
示例3: onAdded
import io.reactivex.Observable; //导入方法依赖的package包/类
private Observable<Map.Entry<K, V>> onAdded() {
return Observable.wrap(added);
}
示例4: onRemoved
import io.reactivex.Observable; //导入方法依赖的package包/类
private Observable<Map.Entry<K, V>> onRemoved() {
return Observable.wrap(removed);
}
示例5: onUpdated
import io.reactivex.Observable; //导入方法依赖的package包/类
private Observable<EntryChange<K, V>> onUpdated() {
return Observable.wrap(updated);
}
示例6: observableChanges
import io.reactivex.Observable; //导入方法依赖的package包/类
/**
* Emits a read-only copy of the list on subscription and whenever it the set is updated. If a method such as
* {@link #addAll(Collection)} is used, it will emit a copy only once and only if the set was changed.
*
* @return The {@link Observable} object.
*/
@Override
public Observable<Set<E>> observableChanges() {
return Observable.wrap(items);
}
示例7: onAdded
import io.reactivex.Observable; //导入方法依赖的package包/类
/**
* Returns an observable which emits a value when a new element is added to the set. The value emitted is the
* element added to the set.
*
* @return The {@link Observable} object.
*/
public Observable<E> onAdded() {
return Observable.wrap(added);
}
示例8: onRemoved
import io.reactivex.Observable; //导入方法依赖的package包/类
/**
* Returns an observable which emits a value when an element is removed from the set. The value emitted is the
* element removed from the set.
*
* @return The {@link Observable} object.
*/
public Observable<E> onRemoved() {
return Observable.wrap(removed);
}
示例9: observableChanges
import io.reactivex.Observable; //导入方法依赖的package包/类
/**
* Emits a read-only copy of the list on subscription and whenever it the list is updated. If a method such as
* {@link #addAll(Collection)} is used, it will emit a copy only once and only if the list was changed.
*
* @return The {@link Observable} object.
*/
@Override
public Observable<List<E>> observableChanges() {
return Observable.wrap(items);
}
示例10: onAdded
import io.reactivex.Observable; //导入方法依赖的package包/类
/**
* Returns an observable which emits a value when a new element is added to the list. The value emitted is an
* {@link Indexed} object, which contains the index of the added element in the list and the element itself.
*
* @return The {@link Observable} object.
*/
public Observable<Indexed<E>> onAdded() {
return Observable.wrap(added);
}
示例11: onRemoved
import io.reactivex.Observable; //导入方法依赖的package包/类
/**
* Returns an observable which emits a value when an element is removed from the list. The value emitted is an
* {@link Indexed} object, which contains the index of the removed element in the list and the element itself.
*
* @return The {@link Observable} object.
*/
public Observable<Indexed<E>> onRemoved() {
return Observable.wrap(removed);
}
示例12: onUpdated
import io.reactivex.Observable; //导入方法依赖的package包/类
/**
* Returns an observable which emits a value when an element in the list updated with a new value. The value emitted
* is an {@link IndexedChange} object, which contains the index of the updated element in the list combined with the
* old and new elements.
*
* @return The {@link Observable} object.
*/
public Observable<IndexedChange<E>> onUpdated() {
return Observable.wrap(updated);
}
示例13: onUpdatedChanged
import io.reactivex.Observable; //导入方法依赖的package包/类
/**
* Returns an observable which emits a value when an element in the list updated with a new value, which differs
* from the old value at that index. The value emitted is an {@link IndexedChange} object, which contains the index
* of the updated element in the list combined with the old and new elements.
*
* @return The {@link Observable} object.
*/
public Observable<IndexedChange<E>> onUpdatedChanged() {
return Observable.wrap(updatedChanged);
}
示例14: onMoved
import io.reactivex.Observable; //导入方法依赖的package包/类
/**
* Returns an observable which emits a value when an element in the list is moved to a new and different index. The
* value emitted is an {@link IndexedChange} object, which contains the index of the updated element in the list
* combined with the old and new elements.
*
* @return The {@link Observable} object.
*/
public Observable<IndexedChange<E>> onMoved() {
return Observable.wrap(moved);
}