Closed mikebaum closed 8 years ago
Merge operator added as per PR #23.
Re-opening this issue to remove the merge operator, since a merge operator does not make sense for Properties. A merge operation is only really meaningful for event streams, since properties always have a current value.
Consider the following:
Property<String> propertyA = Property.create("a");
PropertyObservable<String> observable = propertyA.map(val -> val + "b");
PropertyObservable<String> merged = propertyA.mergeWith(observable);
propertyA.setValue("b")
the output would be:
a
ab
b
bb
however, if the order was replaced as:
...
PropertyObservable<String> merged = observable.mergeWith(propertyA);
...
the result would be:
ab
a
bb
b
So the value of the merge depends on the order of the passed PropertyObservables
.
Removed merge in PR #25.
This issue tracks the work to add a merge operator for Properties.