Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor - introducing internal class Observation #158

Closed
6 tasks done
beeth0ven opened this issue Jan 26, 2023 · 0 comments
Closed
6 tasks done

refactor - introducing internal class Observation #158

beeth0ven opened this issue Jan 26, 2023 · 0 comments

Comments

@beeth0ven
Copy link
Contributor

beeth0ven commented Jan 26, 2023

Introducing internal class Observation. Conceptly Observation can be considered as iterator to Observable.

Relationship between Iterable and Iterator

class Iterator<T> { ... }

class Iterable<T> {
  
  Iterator<T> get iterator {
    return Iterator(...);
  }
}

Relationship between Observable and Observation

class Observation<T> implements Disposable { ... }

class Observable<T> {

  Disposable observe(OnData<T> onData) {
    return Observation(...);
  }
}

Plan to refactor part of Observable* implementation using Observation:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant