List of usage examples for javafx.collections ObservableList retainAll
public boolean retainAll(E... elements);
From source file:Main.java
public static void main(String[] args) { ObservableList<String> list = FXCollections.observableArrayList("one", "two"); System.out.println(list);//ww w. j a va2 s .c o m list.addListener(Main::onChanged); list.addAll("A", "B"); System.out.println("After addAll() - list: " + list); list.remove(1, 3); System.out.println("After remove() - list: " + list); list.retainAll("one"); System.out.println("After retainAll() - list: " + list); list.set(0, "ONE"); System.out.println("After set() - list: " + list); }