Interface UndoManagerFactory


  • public interface UndoManagerFactory
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default <C> UndoManager<java.util.List<C>> createMultiChangeUM​(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,​? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply)
      Creates an UndoManager that tracks lists of changes emitted from changeStream.
      default <C> UndoManager<java.util.List<C>> createMultiChangeUM​(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,​? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge)
      Creates an UndoManager that tracks and optionally merges lists of changes emitted from changeStream.
      default <C> UndoManager<java.util.List<C>> createMultiChangeUM​(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,​? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity)
      Creates an UndoManager that tracks and optionally merges lists of changes emitted from changeStream.
      <C> UndoManager<java.util.List<C>> createMultiChangeUM​(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,​? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity, java.time.Duration preventMergeDelay)
      Creates an UndoManager that tracks and optionally merges lists of changes emitted from changeStream.
      default <C> UndoManager<C> createSingleChangeUM​(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,​? extends C> invert, java.util.function.Consumer<C> apply)
      Creates an UndoManager that tracks changes emitted from changeStream.
      default <C> UndoManager<C> createSingleChangeUM​(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,​? extends C> invert, java.util.function.Consumer<C> apply, java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge)
      Creates an UndoManager that tracks and optionally merges changes emitted from changeStream.
      default <C> UndoManager<C> createSingleChangeUM​(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,​? extends C> invert, java.util.function.Consumer<C> apply, java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity)
      Creates an UndoManager that tracks and optionally merges changes emitted from changeStream.
      <C> UndoManager<C> createSingleChangeUM​(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,​? extends C> invert, java.util.function.Consumer<C> apply, java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity, java.time.Duration preventMergeDelay)
      Creates an UndoManager that tracks and optionally merges changes emitted from changeStream.
      static UndoManagerFactory fixedSizeHistoryFactory​(int capacity)
      Creates a factory for UndoManagers with bounded history.
      static <C> UndoManager<java.util.List<C>> fixedSizeHistoryMultiChangeUM​(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,​? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, int capacity)
      Creates an UndoManager with bounded history.
      static <C> UndoManager<java.util.List<C>> fixedSizeHistoryMultiChangeUM​(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,​? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge, int capacity)
      Creates an UndoManager with bounded history.
      static <C> UndoManager<java.util.List<C>> fixedSizeHistoryMultiChangeUM​(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,​? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity, java.time.Duration preventMergeDelay, int capacity)
      Creates an UndoManager with bounded history.
      static <C> UndoManager<C> fixedSizeHistorySingleChangeUM​(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,​? extends C> invert, java.util.function.Consumer<C> apply, int capacity)
      Creates an UndoManager with bounded history.
      static <C> UndoManager<C> fixedSizeHistorySingleChangeUM​(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,​? extends C> invert, java.util.function.Consumer<C> apply, java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge, int capacity)
      Creates an UndoManager with bounded history.
      static <C> UndoManager<C> fixedSizeHistorySingleChangeUM​(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,​? extends C> invert, java.util.function.Consumer<C> apply, java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity, java.time.Duration preventMergeDelay, int capacity)
      Creates an UndoManager with bounded history.
      static UndoManagerFactory unlimitedHistoryFactory()
      Creates a factory for UndoManagers with unlimited history.
      static <C> UndoManager<java.util.List<C>> unlimitedHistoryMultiChangeUM​(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,​? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply)
      Creates an UndoManager with unlimited history.
      static <C> UndoManager<java.util.List<C>> unlimitedHistoryMultiChangeUM​(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,​? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge)
      Creates an UndoManager with unlimited history.
      static <C> UndoManager<java.util.List<C>> unlimitedHistoryMultiChangeUM​(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,​? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity)
      Creates an UndoManager with unlimited history.
      static <C> UndoManager<java.util.List<C>> unlimitedHistoryMultiChangeUM​(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,​? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity, java.time.Duration preventMergeDelay)
      Creates an UndoManager with unlimited history.
      static <C> UndoManager<C> unlimitedHistorySingleChangeUM​(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,​? extends C> invert, java.util.function.Consumer<C> apply)
      Creates an UndoManager with unlimited history.
      static <C> UndoManager<C> unlimitedHistorySingleChangeUM​(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,​? extends C> invert, java.util.function.Consumer<C> apply, java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge)
      Creates an UndoManager with unlimited history.
      static <C> UndoManager<C> unlimitedHistorySingleChangeUM​(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,​? extends C> invert, java.util.function.Consumer<C> apply, java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity)
      Creates an UndoManager with unlimited history.
      static <C> UndoManager<C> unlimitedHistorySingleChangeUM​(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,​? extends C> invert, java.util.function.Consumer<C> apply, java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity, java.time.Duration preventMergeDelay)
      Creates an UndoManager with unlimited history.
      static UndoManagerFactory zeroHistoryFactory()
      Creates a factory for UndoManagers with no history.
      static <C> UndoManager<java.util.List<C>> zeroHistoryMultiChangeUM​(org.reactfx.EventStream<java.util.List<C>> changeStream)
      Creates an UndoManager with no history: all changes emitted from changeStream will be immediately forgotten.
      static <C> UndoManager<C> zeroHistorySingleChangeUM​(org.reactfx.EventStream<C> changeStream)
      Creates an UndoManager with no history: all changes emitted from changeStream will be immediately forgotten.
    • Method Detail

      • createSingleChangeUM

        default <C> UndoManager<C> createSingleChangeUM​(org.reactfx.EventStream<C> changeStream,
                                                        java.util.function.Function<? super C,​? extends C> invert,
                                                        java.util.function.Consumer<C> apply)
        Creates an UndoManager that tracks changes emitted from changeStream.
        Type Parameters:
        C - representation of a change
        Parameters:
        invert - Inverts a change, so that applying the inverted change (apply.accept(invert.apply(c))) has the effect of undoing the original change (c). Inverting a change twice should result in the original change (invert.apply(invert.apply(c)).equals(c)).
        apply - Used to apply a change. From the point of view of apply, C describes an action to be performed. Calling apply.accept(c) must cause c to be emitted from changeStream.
      • createSingleChangeUM

        default <C> UndoManager<C> createSingleChangeUM​(org.reactfx.EventStream<C> changeStream,
                                                        java.util.function.Function<? super C,​? extends C> invert,
                                                        java.util.function.Consumer<C> apply,
                                                        java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge)
        Creates an UndoManager that tracks and optionally merges changes emitted from changeStream.
        Type Parameters:
        C - representation of a change
        Parameters:
        invert - Inverts a change, so that applying the inverted change (apply.accept(invert.apply(c))) has the effect of undoing the original change (c). Inverting a change twice should result in the original change (invert.apply(invert.apply(c)).equals(c)).
        apply - Used to apply a change. From the point of view of apply, C describes an action to be performed. Calling apply.accept(c) must cause c to be emitted from changeStream.
        merge - Used to merge two subsequent changes into one. Returns an empty Optional when the changes cannot or should not be merged.
      • createSingleChangeUM

        default <C> UndoManager<C> createSingleChangeUM​(org.reactfx.EventStream<C> changeStream,
                                                        java.util.function.Function<? super C,​? extends C> invert,
                                                        java.util.function.Consumer<C> apply,
                                                        java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge,
                                                        java.util.function.Predicate<C> isIdentity)
        Creates an UndoManager that tracks and optionally merges changes emitted from changeStream.
        Type Parameters:
        C - representation of a change
        Parameters:
        invert - Inverts a change, so that applying the inverted change (apply.accept(invert.apply(c))) has the effect of undoing the original change (c). Inverting a change twice should result in the original change (invert.apply(invert.apply(c)).equals(c)).
        apply - Used to apply a change. From the point of view of apply, C describes an action to be performed. Calling apply.accept(c) must cause c to be emitted from changeStream.
        merge - Used to merge two subsequent changes into one. Returns an empty Optional when the changes cannot or should not be merged. If two changes "annihilate" (i.e. merge.apply(c1, c2).isPresen() and isIdentity.test(merge.apply(c1, c2).get()) are both true), it should be the case that one is inverse of the other (invert.apply(c1).equals(c2)).
        isIdentity - returns true for changes whose application would have no effect, thereby equivalent to an identity function (Function.identity()) on the underlying model.
      • createSingleChangeUM

        <C> UndoManager<C> createSingleChangeUM​(org.reactfx.EventStream<C> changeStream,
                                                java.util.function.Function<? super C,​? extends C> invert,
                                                java.util.function.Consumer<C> apply,
                                                java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge,
                                                java.util.function.Predicate<C> isIdentity,
                                                java.time.Duration preventMergeDelay)
        Creates an UndoManager that tracks and optionally merges changes emitted from changeStream.
        Type Parameters:
        C - representation of a change
        Parameters:
        invert - Inverts a change, so that applying the inverted change (apply.accept(invert.apply(c))) has the effect of undoing the original change (c). Inverting a change twice should result in the original change (invert.apply(invert.apply(c)).equals(c)).
        apply - Used to apply a change. From the point of view of apply, C describes an action to be performed. Calling apply.accept(c) must cause c to be emitted from changeStream.
        merge - Used to merge two subsequent changes into one. Returns an empty Optional when the changes cannot or should not be merged. If two changes "annihilate" (i.e. merge.apply(c1, c2).isPresen() and isIdentity.test(merge.apply(c1, c2).get()) are both true), it should be the case that one is inverse of the other (invert.apply(c1).equals(c2)).
        isIdentity - returns true for changes whose application would have no effect, thereby equivalent to an identity function (Function.identity()) on the underlying model.
        preventMergeDelay - the amount by which to wait before calling UndoManager.preventMerge(). Helpful when one wants to prevent merges after a period of inactivity (the changeStream doesn't emit an event after the given duration). Passing in a negative or zero duration will never call UndoManager.preventMerge().
      • unlimitedHistorySingleChangeUM

        static <C> UndoManager<C> unlimitedHistorySingleChangeUM​(org.reactfx.EventStream<C> changeStream,
                                                                 java.util.function.Function<? super C,​? extends C> invert,
                                                                 java.util.function.Consumer<C> apply,
                                                                 java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge,
                                                                 java.util.function.Predicate<C> isIdentity,
                                                                 java.time.Duration preventMergeDelay)
        Creates an UndoManager with unlimited history. For description of parameters, see createSingleChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).
      • fixedSizeHistorySingleChangeUM

        static <C> UndoManager<C> fixedSizeHistorySingleChangeUM​(org.reactfx.EventStream<C> changeStream,
                                                                 java.util.function.Function<? super C,​? extends C> invert,
                                                                 java.util.function.Consumer<C> apply,
                                                                 int capacity)
        Creates an UndoManager with bounded history. When at full capacity, a new change will cause the oldest change to be forgotten.

        For description of the remaining parameters, see createSingleChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).

        Parameters:
        capacity - maximum number of changes the returned UndoManager can store
      • fixedSizeHistorySingleChangeUM

        static <C> UndoManager<C> fixedSizeHistorySingleChangeUM​(org.reactfx.EventStream<C> changeStream,
                                                                 java.util.function.Function<? super C,​? extends C> invert,
                                                                 java.util.function.Consumer<C> apply,
                                                                 java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge,
                                                                 int capacity)
        Creates an UndoManager with bounded history. When at full capacity, a new change will cause the oldest change to be forgotten.

        For description of the remaining parameters, see createSingleChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).

        Parameters:
        capacity - maximum number of changes the returned UndoManager can store
      • fixedSizeHistorySingleChangeUM

        static <C> UndoManager<C> fixedSizeHistorySingleChangeUM​(org.reactfx.EventStream<C> changeStream,
                                                                 java.util.function.Function<? super C,​? extends C> invert,
                                                                 java.util.function.Consumer<C> apply,
                                                                 java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge,
                                                                 java.util.function.Predicate<C> isIdentity,
                                                                 java.time.Duration preventMergeDelay,
                                                                 int capacity)
        Creates an UndoManager with bounded history. When at full capacity, a new change will cause the oldest change to be forgotten.

        For description of the remaining parameters, see createSingleChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).

        Parameters:
        capacity - maximum number of changes the returned UndoManager can store
      • zeroHistorySingleChangeUM

        static <C> UndoManager<C> zeroHistorySingleChangeUM​(org.reactfx.EventStream<C> changeStream)
        Creates an UndoManager with no history: all changes emitted from changeStream will be immediately forgotten. Therefore, the returned UndoManager will never be able to undo/redo any change emitted from changeStream. However, the (imaginary) current position will keep advancing, so that one can still use UndoManager.atMarkedPositionProperty() to determine whether any change has occurred since the last UndoManager.mark() (e.g. since the last save).
      • createMultiChangeUM

        default <C> UndoManager<java.util.List<C>> createMultiChangeUM​(org.reactfx.EventStream<java.util.List<C>> changeStream,
                                                                       java.util.function.Function<? super C,​? extends C> invert,
                                                                       java.util.function.Consumer<java.util.List<C>> apply)
        Creates an UndoManager that tracks lists of changes emitted from changeStream.
        Type Parameters:
        C - representation of a change
        Parameters:
        invert - Inverts a change, so that applying the inverted change (apply.accept(invert.apply(c))) has the effect of undoing the original change (c). Inverting a change twice should result in the original change (invert.apply(invert.apply(c)).equals(c)).
        apply - Used to apply a list of changes. list describes a list of actions to be performed. Calling apply.accept(list) must cause list to be emitted from the changeStream.
      • createMultiChangeUM

        default <C> UndoManager<java.util.List<C>> createMultiChangeUM​(org.reactfx.EventStream<java.util.List<C>> changeStream,
                                                                       java.util.function.Function<? super C,​? extends C> invert,
                                                                       java.util.function.Consumer<java.util.List<C>> apply,
                                                                       java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge)
        Creates an UndoManager that tracks and optionally merges lists of changes emitted from changeStream.
        Type Parameters:
        C - representation of a change
        Parameters:
        invert - Inverts a change, so that applying the inverted change (apply.accept(invert.apply(c))) has the effect of undoing the original change (c). Inverting a change twice should result in the original change (invert.apply(invert.apply(c)).equals(c)).
        apply - Used to apply a list of changes. list describes a list of actions to be performed. Calling apply.accept(list) must cause list to be emitted from the changeStream.
        merge - Used to merge two subsequent changes into one. Returns an empty Optional when the changes cannot or should not be merged.
      • createMultiChangeUM

        default <C> UndoManager<java.util.List<C>> createMultiChangeUM​(org.reactfx.EventStream<java.util.List<C>> changeStream,
                                                                       java.util.function.Function<? super C,​? extends C> invert,
                                                                       java.util.function.Consumer<java.util.List<C>> apply,
                                                                       java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge,
                                                                       java.util.function.Predicate<C> isIdentity)
        Creates an UndoManager that tracks and optionally merges lists of changes emitted from changeStream.
        Type Parameters:
        C - representation of a change
        Parameters:
        invert - Inverts a change, so that applying the inverted change (apply.accept(invert.apply(c))) has the effect of undoing the original change (c). Inverting a change twice should result in the original change (invert.apply(invert.apply(c)).equals(c)).
        apply - Used to apply a list of changes. list describes a list of actions to be performed. Calling apply.accept(list) must cause list to be emitted from the changeStream.
        merge - Used to merge two subsequent changes into one. Returns an empty Optional when the changes cannot or should not be merged. If two changes "annihilate" (i.e. merge.apply(c1, c2).isPresen() and isIdentity.test(merge.apply(c1, c2).get()) are both true), it should be the case that one is inverse of the other (invert.apply(c1).equals(c2)).
        isIdentity - returns true for changes whose application would have no effect, thereby equivalent to an identity function (Function.identity()) on the underlying model.
      • createMultiChangeUM

        <C> UndoManager<java.util.List<C>> createMultiChangeUM​(org.reactfx.EventStream<java.util.List<C>> changeStream,
                                                               java.util.function.Function<? super C,​? extends C> invert,
                                                               java.util.function.Consumer<java.util.List<C>> apply,
                                                               java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge,
                                                               java.util.function.Predicate<C> isIdentity,
                                                               java.time.Duration preventMergeDelay)
        Creates an UndoManager that tracks and optionally merges lists of changes emitted from changeStream.
        Type Parameters:
        C - representation of a change
        Parameters:
        invert - Inverts a change, so that applying the inverted change (apply.accept(invert.apply(c))) has the effect of undoing the original change (c). Inverting a change twice should result in the original change (invert.apply(invert.apply(c)).equals(c)).
        apply - Used to apply a list of changes. list describes a list of actions to be performed. Calling apply.accept(list) must cause list to be emitted from the changeStream.
        merge - Used to merge two subsequent changes into one. Returns an empty Optional when the changes cannot or should not be merged. If two changes "annihilate" (i.e. merge.apply(c1, c2).isPresen() and isIdentity.test(merge.apply(c1, c2).get()) are both true), it should be the case that one is inverse of the other (invert.apply(c1).equals(c2)).
        isIdentity - returns true for changes whose application would have no effect, thereby equivalent to an identity function (Function.identity()) on the underlying model.
        preventMergeDelay - the amount by which to wait before calling UndoManager.preventMerge(). Helpful when one wants to prevent merges after a period of inactivity (the changeStream doesn't emit an event after the given duration). Passing in a negative or zero duration will never call UndoManager.preventMerge().
      • unlimitedHistoryMultiChangeUM

        static <C> UndoManager<java.util.List<C>> unlimitedHistoryMultiChangeUM​(org.reactfx.EventStream<java.util.List<C>> changeStream,
                                                                                java.util.function.Function<? super C,​? extends C> invert,
                                                                                java.util.function.Consumer<java.util.List<C>> apply,
                                                                                java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge,
                                                                                java.util.function.Predicate<C> isIdentity)
        Creates an UndoManager with unlimited history. For description of parameters, see createMultiChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).
      • unlimitedHistoryMultiChangeUM

        static <C> UndoManager<java.util.List<C>> unlimitedHistoryMultiChangeUM​(org.reactfx.EventStream<java.util.List<C>> changeStream,
                                                                                java.util.function.Function<? super C,​? extends C> invert,
                                                                                java.util.function.Consumer<java.util.List<C>> apply,
                                                                                java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge,
                                                                                java.util.function.Predicate<C> isIdentity,
                                                                                java.time.Duration preventMergeDelay)
        Creates an UndoManager with unlimited history. For description of parameters, see createMultiChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).
      • fixedSizeHistoryMultiChangeUM

        static <C> UndoManager<java.util.List<C>> fixedSizeHistoryMultiChangeUM​(org.reactfx.EventStream<java.util.List<C>> changeStream,
                                                                                java.util.function.Function<? super C,​? extends C> invert,
                                                                                java.util.function.Consumer<java.util.List<C>> apply,
                                                                                int capacity)
        Creates an UndoManager with bounded history. When at full capacity, a new change will cause the oldest change to be forgotten.

        For description of the remaining parameters, see createMultiChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).

        Parameters:
        capacity - maximum number of changes the returned UndoManager can store
      • fixedSizeHistoryMultiChangeUM

        static <C> UndoManager<java.util.List<C>> fixedSizeHistoryMultiChangeUM​(org.reactfx.EventStream<java.util.List<C>> changeStream,
                                                                                java.util.function.Function<? super C,​? extends C> invert,
                                                                                java.util.function.Consumer<java.util.List<C>> apply,
                                                                                java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge,
                                                                                int capacity)
        Creates an UndoManager with bounded history. When at full capacity, a new change will cause the oldest change to be forgotten.

        For description of the remaining parameters, see createMultiChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).

        Parameters:
        capacity - maximum number of changes the returned UndoManager can store
      • fixedSizeHistoryMultiChangeUM

        static <C> UndoManager<java.util.List<C>> fixedSizeHistoryMultiChangeUM​(org.reactfx.EventStream<java.util.List<C>> changeStream,
                                                                                java.util.function.Function<? super C,​? extends C> invert,
                                                                                java.util.function.Consumer<java.util.List<C>> apply,
                                                                                java.util.function.BiFunction<C,​C,​java.util.Optional<C>> merge,
                                                                                java.util.function.Predicate<C> isIdentity,
                                                                                java.time.Duration preventMergeDelay,
                                                                                int capacity)
        Creates an UndoManager with bounded history. When at full capacity, a new change will cause the oldest change to be forgotten.

        For description of the remaining parameters, see createMultiChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).

        Parameters:
        capacity - maximum number of changes the returned UndoManager can store
      • zeroHistoryMultiChangeUM

        static <C> UndoManager<java.util.List<C>> zeroHistoryMultiChangeUM​(org.reactfx.EventStream<java.util.List<C>> changeStream)
        Creates an UndoManager with no history: all changes emitted from changeStream will be immediately forgotten. Therefore, the returned UndoManager will never be able to undo/redo any change emitted from changeStream. However, the (imaginary) current position will keep advancing, so that one can still use UndoManager.atMarkedPositionProperty() to determine whether any change has occurred since the last UndoManager.mark() (e.g. since the last save).