当前位置: 首页>>代码示例>>Java>>正文


Java Observable.wrap方法代码示例

本文整理汇总了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);
}
 
开发者ID:FHannes,项目名称:RxJavaCollections,代码行数:4,代码来源:ObservableMap.java

示例2: onPut

import io.reactivex.Observable; //导入方法依赖的package包/类
private Observable<Map.Entry<K, V>> onPut() {
    return Observable.wrap(put);
}
 
开发者ID:FHannes,项目名称:RxJavaCollections,代码行数:4,代码来源:ObservableMap.java

示例3: onAdded

import io.reactivex.Observable; //导入方法依赖的package包/类
private Observable<Map.Entry<K, V>> onAdded() {
    return Observable.wrap(added);
}
 
开发者ID:FHannes,项目名称:RxJavaCollections,代码行数:4,代码来源:ObservableMap.java

示例4: onRemoved

import io.reactivex.Observable; //导入方法依赖的package包/类
private Observable<Map.Entry<K, V>> onRemoved() {
    return Observable.wrap(removed);
}
 
开发者ID:FHannes,项目名称:RxJavaCollections,代码行数:4,代码来源:ObservableMap.java

示例5: onUpdated

import io.reactivex.Observable; //导入方法依赖的package包/类
private Observable<EntryChange<K, V>> onUpdated() {
    return Observable.wrap(updated);
}
 
开发者ID:FHannes,项目名称:RxJavaCollections,代码行数:4,代码来源:ObservableMap.java

示例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);
}
 
开发者ID:FHannes,项目名称:RxJavaCollections,代码行数:11,代码来源:ObservableSet.java

示例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);
}
 
开发者ID:FHannes,项目名称:RxJavaCollections,代码行数:10,代码来源:ObservableSet.java

示例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);
}
 
开发者ID:FHannes,项目名称:RxJavaCollections,代码行数:10,代码来源:ObservableSet.java

示例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);
}
 
开发者ID:FHannes,项目名称:RxJavaCollections,代码行数:11,代码来源:ObservableList.java

示例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);
}
 
开发者ID:FHannes,项目名称:RxJavaCollections,代码行数:10,代码来源:ObservableList.java

示例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);
}
 
开发者ID:FHannes,项目名称:RxJavaCollections,代码行数:10,代码来源:ObservableList.java

示例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);
}
 
开发者ID:FHannes,项目名称:RxJavaCollections,代码行数:11,代码来源:ObservableList.java

示例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);
}
 
开发者ID:FHannes,项目名称:RxJavaCollections,代码行数:11,代码来源:ObservableList.java

示例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);
}
 
开发者ID:FHannes,项目名称:RxJavaCollections,代码行数:11,代码来源:ObservableList.java


注:本文中的io.reactivex.Observable.wrap方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。