Releases: tobiasdiez/EasyBind
Releases · tobiasdiez/EasyBind
Release 2.2.0
Changed
- Mark JavaFX dependency as transitive. Thanks to Sebastian Stenzel.
- Remove
classifier = linux
for JavaFX dependency in thepom
file. This makes it easier to use the library on different OS without pulling-in the wrong dependencies.
External contributor
Special thanks to @overheadhunter.
Release 2.1.0
Added
- Added support for JDK >= 9. #21
- Added
EasyObservableList#mapped
as fluid alternative toEasyBind#map
- Added
EasyObservableList#filteredWrapped
as an alternative toEasyObservableList#filtered
that returns anEasyObservableList
instead of aFilteredList
.- This allows fluid method chaining without having to wrap the
FilteredList
usingEasyBind#wrapList
again. - It is a temporary workaround that will be removed once openjdk/jfx#278 is merged.
- This allows fluid method chaining without having to wrap the
Changed
EasyBind#flatten
andEasyBind#concat
now return anEasyObservableList
instead of anObservableList
.
External contributor
Special thanks to @piegamesde
v2.0.0
Added
- Added new interface
EasyObservableList
which is a wrapper around a standardObservableList
providing access to a few convenient helper methods. UseEasyBind.wrapList
to create such a wrapper around a givenObservableList
. - Added new method
EasyBind.reduce(list, accumulation)
that creates a binding holding the result of the accumulation function on the provided list. - Added a few new methods
EasyBind.valueAt
that are essentially equivalent to the standardBindings.valueAt
methods except that they gracefully handle non-existing values by returning aOptionalBinding
. - Completely reworked bindings for optional values:
- New methods in
ObervableOptionalValue
havingValue
in the name provide convenient access to the corresponding method of an optional. For example,getValueOrElse
andisValuePresent
are analogs ofOptional.getOrElse
andOptional.isPresent
. - New methods that create bindings whose value is computed similar to the corresponding methods in
Optional
, e.g.isPresent
,isEmpty
,orElse
,flatMap
.
- New methods in
Changed
- Renamed package to
com.tobiasdiez.easybind
. - Split
MonadicBinding
into a part which is really concerned with optionals (newObervableOptionalValue
) and one which provides helper methods for a fluent interface for normal bindings (newEasyBinding
). - Renamed
flatMap
tomapObservable
to avoid clashes with the corresponding method inOptional
. - The
mapObservable
andselectProperty
now invoke the mapper even if the source observable value holds anull
value. The corresponding methods inObservableOptionalValue
allow for a more convenientnull
handling. - Renamed subscribe methods that accept listeners to
listen
, which invoke the given listener every time the value changes. In contrast, thesubscribe
method also invokes the given subscriber upon registration. - Renamed
EasyBind.listBind
tobindContent
in order to align with the naming ofBindings.bindContent
. - Moved
PropertyBinding
tocom.tobiasdiez.easybind
.
Removed
- Removed
EasyBind.filter(ObservableValue<T> source, Predicate<? super T> predicate)
. UseEasyBind.wrapNullable(source).filter(predicate)
instead. - Removed
EasyBind.orElse(ObservableValue<? extends T> source, T other)
. UseEasyBind.wrapNullable(source).orElse(other)
instead.
v1.2.2
Added
EasyBind.flatten(List<ObservableList<T>> lists)
andEasyBind.concat(ObservableList<T>... lists)
that create a new list combining the values of the given lists. UnlikeFXCollections.concat()
, updates to the source lists propagate to the combined list.EasyBind.mapBacked(ObservableList<A> source, Function<A, B> mapper)
that works similar toEasyBind.map
with the important difference that themapper
is applied only on initializing the list and not every time an item in the list is accessed.EasyBind.filter
EasyBind.flatMap
EasyBind.selectProperty
EasyBind.orElse
- Support for Java Module System by providing correct module information.