Change

sealed trait Change[T]

Trait that indicates a Change in an ObservableBuffer. It is a simpler version of JavaFX's `ListChangeListener.Change`, where each subclass indicates a specific change operation. Unlike JavaFX, all subclasses are exclusive to each other. This enables using pattern matching:

Trait that indicates a Change in an ObservableBuffer. It is a simpler version of JavaFX's `ListChangeListener.Change`, where each subclass indicates a specific change operation. Unlike JavaFX, all subclasses are exclusive to each other. This enables using pattern matching:

items.onChange((_, changes) => {
 for (change <- changes)
   change match {
     case Add(pos, added)                => ...
     case Remove(pos, removed)           => ...
     case Reorder(from, to, permutation) => ...
     case Update(pos, updated)           => ...
   }
})

"replace" is represented as two changes Remove and Add.

class Object
trait Matchable
class Any
class Add[T]
class Remove[T]
class Reorder[T]
class Update[T]