當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。