本文整理匯總了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);
}