Skip to content

Commit

Permalink
Changed ObservableLists.isEmpty() return value type to BooleanExpression
Browse files Browse the repository at this point in the history
  • Loading branch information
salmonb committed May 2, 2024
1 parent 41eb000 commit f372b92
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import dev.webfx.platform.util.Objects;
import dev.webfx.platform.util.collection.Collections;
import dev.webfx.platform.util.function.Converter;
import javafx.beans.binding.BooleanExpression;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.value.ObservableBooleanValue;
import javafx.collections.ListChangeListener;
import javafx.collections.ObservableList;

Expand Down Expand Up @@ -67,7 +67,7 @@ public static <T> void runOnListChange(ListChangeListener<T> listener, Observabl
list.addListener(listener);
}

public static <T> ObservableBooleanValue isEmpty(ObservableList<T> list) {
public static <T> BooleanExpression isEmpty(ObservableList<T> list) {
SimpleBooleanProperty isEmpty = new SimpleBooleanProperty(list.isEmpty());
runOnListChange(c -> isEmpty.setValue(list.isEmpty()), list);
return isEmpty;
Expand Down

0 comments on commit f372b92

Please sign in to comment.