Top Methods
org.fxmisc.undo

public Interface UndoManagerFactory

Imports
java.time.Duration, java.util.List, .Optional, java.util.function.BiFunction, .Consumer, .Function, .Predicate, org.fxmisc.undo.impl.ChangeQueue, .FixedSizeChangeQueue, .MultiChangeUndoManagerImpl, .UndoManagerImpl, .UnlimitedChangeQueue, .ZeroSizeChangeQueue, org.reactfx.EventStream

Method Summary

Modifier and TypeMethod and Description
public default <
representation of a change
C
>
UndoManager<List<C>>
createMultiChangeUM(EventStream<List<C>> changeStream, Function<? super C, ? extends C>
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)).
invert
,
Consumer<List<C>>
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.
apply
)

Creates an UndoManager that tracks lists of changes emitted from changeStream.

public default <
representation of a change
C
>
UndoManager<List<C>>
createMultiChangeUM(EventStream<List<C>> changeStream, Function<? super C, ? extends C>
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)).
invert
,
Consumer<List<C>>
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.
apply
,
BiFunction<C, C, Optional<C>>
Used to merge two subsequent changes into one. Returns an empty Optional when the changes cannot or should not be merged.
merge
)

Creates an UndoManager that tracks and optionally merges lists of changes emitted from changeStream.

public default <
representation of a change
C
>
UndoManager<List<C>>
createMultiChangeUM(EventStream<List<C>> changeStream, Function<? super C, ? extends C>
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)).
invert
,
Consumer<List<C>>
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.
apply
,
BiFunction<C, C, Optional<C>>
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)).
merge
,
Predicate<C>
returns true for changes whose application would have no effect, thereby equivalent to an identity function (Function#identity()) on the underlying model.
isIdentity
)

Creates an UndoManager that tracks and optionally merges lists of changes emitted from changeStream.

public <
representation of a change
C
>
UndoManager<List<C>>
createMultiChangeUM(EventStream<List<C>> changeStream, Function<? super C, ? extends C>
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)).
invert
,
Consumer<List<C>>
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.
apply
,
BiFunction<C, C, Optional<C>>
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)).
merge
,
Predicate<C>
returns true for changes whose application would have no effect, thereby equivalent to an identity function (Function#identity()) on the underlying model.
isIdentity
,
Duration
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().
preventMergeDelay
)

Creates an UndoManager that tracks and optionally merges lists of changes emitted from changeStream.

public default <
representation of a change
C
>
UndoManager<C>
createSingleChangeUM(EventStream<C> changeStream, Function<? super C, ? extends C>
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)).
invert
,
Consumer<C>
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.
apply
)

Creates an UndoManager that tracks changes emitted from changeStream.

public default <
representation of a change
C
>
UndoManager<C>
createSingleChangeUM(EventStream<C> changeStream, Function<? super C, ? extends C>
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)).
invert
,
Consumer<C>
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.
apply
,
BiFunction<C, C, Optional<C>>
Used to merge two subsequent changes into one. Returns an empty Optional when the changes cannot or should not be merged.
merge
)

Creates an UndoManager that tracks and optionally merges changes emitted from changeStream.

public default <
representation of a change
C
>
UndoManager<C>
createSingleChangeUM(EventStream<C> changeStream, Function<? super C, ? extends C>
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)).
invert
,
Consumer<C>
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.
apply
,
BiFunction<C, C, Optional<C>>
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)).
merge
,
Predicate<C>
returns true for changes whose application would have no effect, thereby equivalent to an identity function (Function#identity()) on the underlying model.
isIdentity
)

Creates an UndoManager that tracks and optionally merges changes emitted from changeStream.

public <
representation of a change
C
>
UndoManager<C>
createSingleChangeUM(EventStream<C> changeStream, Function<? super C, ? extends C>
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)).
invert
,
Consumer<C>
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.
apply
,
BiFunction<C, C, Optional<C>>
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)).
merge
,
Predicate<C>
returns true for changes whose application would have no effect, thereby equivalent to an identity function (Function#identity()) on the underlying model.
isIdentity
,
Duration
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().
preventMergeDelay
)

Creates an UndoManager that tracks and optionally merges changes emitted from changeStream.

public static UndoManagerFactory
fixedSizeHistoryFactory(int capacity)

Creates a factory for UndoManagers with bounded history.

public static <C> UndoManager<List<C>>
fixedSizeHistoryMultiChangeUM(EventStream<List<C>> changeStream, Function<? super C, ? extends C> invert, Consumer<List<C>> apply, int
maximum number of changes the returned UndoManager can store
capacity
)

Creates an UndoManager with bounded history.

public static <C> UndoManager<List<C>>
fixedSizeHistoryMultiChangeUM(EventStream<List<C>> changeStream, Function<? super C, ? extends C> invert, Consumer<List<C>> apply, BiFunction<C, C, Optional<C>> merge, int
maximum number of changes the returned UndoManager can store
capacity
)

Creates an UndoManager with bounded history.

public static <C> UndoManager<List<C>>
fixedSizeHistoryMultiChangeUM(EventStream<List<C>> changeStream, Function<? super C, ? extends C> invert, Consumer<List<C>> apply, BiFunction<C, C, Optional<C>> merge, Predicate<C> isIdentity, Duration preventMergeDelay, int
maximum number of changes the returned UndoManager can store
capacity
)

Creates an UndoManager with bounded history.

public static <C> UndoManager<C>
fixedSizeHistorySingleChangeUM(EventStream<C> changeStream, Function<? super C, ? extends C> invert, Consumer<C> apply, int
maximum number of changes the returned UndoManager can store
capacity
)

Creates an UndoManager with bounded history.

public static <C> UndoManager<C>
fixedSizeHistorySingleChangeUM(EventStream<C> changeStream, Function<? super C, ? extends C> invert, Consumer<C> apply, BiFunction<C, C, Optional<C>> merge, int
maximum number of changes the returned UndoManager can store
capacity
)

Creates an UndoManager with bounded history.

public static <C> UndoManager<C>
fixedSizeHistorySingleChangeUM(EventStream<C> changeStream, Function<? super C, ? extends C> invert, Consumer<C> apply, BiFunction<C, C, Optional<C>> merge, Predicate<C> isIdentity, Duration preventMergeDelay, int
maximum number of changes the returned UndoManager can store
capacity
)

Creates an UndoManager with bounded history.

public static UndoManagerFactory
unlimitedHistoryFactory()

Creates a factory for UndoManagers with unlimited history.

public static <C> UndoManager<List<C>>
unlimitedHistoryMultiChangeUM(EventStream<List<C>> changeStream, Function<? super C, ? extends C> invert, Consumer<List<C>> apply)

Creates an UndoManager with unlimited history.

public static <C> UndoManager<List<C>>
unlimitedHistoryMultiChangeUM(EventStream<List<C>> changeStream, Function<? super C, ? extends C> invert, Consumer<List<C>> apply, BiFunction<C, C, Optional<C>> merge)

Creates an UndoManager with unlimited history.

public static <C> UndoManager<List<C>>
unlimitedHistoryMultiChangeUM(EventStream<List<C>> changeStream, Function<? super C, ? extends C> invert, Consumer<List<C>> apply, BiFunction<C, C, Optional<C>> merge, Predicate<C> isIdentity)

Creates an UndoManager with unlimited history.

public static <C> UndoManager<List<C>>
unlimitedHistoryMultiChangeUM(EventStream<List<C>> changeStream, Function<? super C, ? extends C> invert, Consumer<List<C>> apply, BiFunction<C, C, Optional<C>> merge, Predicate<C> isIdentity, Duration preventMergeDelay)

Creates an UndoManager with unlimited history.

public static <C> UndoManager<C>
unlimitedHistorySingleChangeUM(EventStream<C> changeStream, Function<? super C, ? extends C> invert, Consumer<C> apply)

Creates an UndoManager with unlimited history.

public static <C> UndoManager<C>
unlimitedHistorySingleChangeUM(EventStream<C> changeStream, Function<? super C, ? extends C> invert, Consumer<C> apply, BiFunction<C, C, Optional<C>> merge)

Creates an UndoManager with unlimited history.

public static <C> UndoManager<C>
unlimitedHistorySingleChangeUM(EventStream<C> changeStream, Function<? super C, ? extends C> invert, Consumer<C> apply, BiFunction<C, C, Optional<C>> merge, Predicate<C> isIdentity)

Creates an UndoManager with unlimited history.

public static <C> UndoManager<C>
unlimitedHistorySingleChangeUM(EventStream<C> changeStream, Function<? super C, ? extends C> invert, Consumer<C> apply, BiFunction<C, C, Optional<C>> merge, Predicate<C> isIdentity, Duration preventMergeDelay)

Creates an UndoManager with unlimited history.

public static UndoManagerFactory
zeroHistoryFactory()

Creates a factory for UndoManagers with no history.

public static <C> UndoManager<List<C>>
zeroHistoryMultiChangeUM(EventStream<List<C>> changeStream)

Creates an UndoManager with no history: all changes emitted from changeStream will be immediately forgotten.

public static <C> UndoManager<C>
zeroHistorySingleChangeUM(EventStream<C> changeStream)

Creates an UndoManager with no history: all changes emitted from changeStream will be immediately forgotten.

Method Detail

createMultiChangeUMback to summary
public default <C> UndoManager<List<C>> createMultiChangeUM(EventStream<List<C>> changeStream, Function<? super C, ? extends C> invert, Consumer<List<C>> apply)

Creates an UndoManager that tracks lists of changes emitted from changeStream.

Parameters
<C>
representation of a change
invert:Function<? super C, ? extends C>

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:Consumer<List<C>>

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.

createMultiChangeUMback to summary
public default <C> UndoManager<List<C>> createMultiChangeUM(EventStream<List<C>> changeStream, Function<? super C, ? extends C> invert, Consumer<List<C>> apply, BiFunction<C, C, Optional<C>> merge)

Creates an UndoManager that tracks and optionally merges lists of changes emitted from changeStream.

Parameters
<C>
representation of a change
invert:Function<? super C, ? extends C>

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:Consumer<List<C>>

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:BiFunction<C, C, Optional<C>>

Used to merge two subsequent changes into one. Returns an empty Optional when the changes cannot or should not be merged.

createMultiChangeUMback to summary
public default <C> UndoManager<List<C>> createMultiChangeUM(EventStream<List<C>> changeStream, Function<? super C, ? extends C> invert, Consumer<List<C>> apply, BiFunction<C, C, Optional<C>> merge, Predicate<C> isIdentity)

Creates an UndoManager that tracks and optionally merges lists of changes emitted from changeStream.

Parameters
<C>
representation of a change
invert:Function<? super C, ? extends C>

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:Consumer<List<C>>

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:BiFunction<C, C, Optional<C>>

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:Predicate<C>

returns true for changes whose application would have no effect, thereby equivalent to an identity function (Function#identity()) on the underlying model.

createMultiChangeUMback to summary
public <C> UndoManager<List<C>> createMultiChangeUM(EventStream<List<C>> changeStream, Function<? super C, ? extends C> invert, Consumer<List<C>> apply, BiFunction<C, C, Optional<C>> merge, Predicate<C> isIdentity, Duration preventMergeDelay)

Creates an UndoManager that tracks and optionally merges lists of changes emitted from changeStream.

Parameters
<C>
representation of a change
invert:Function<? super C, ? extends C>

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:Consumer<List<C>>

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:BiFunction<C, C, Optional<C>>

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:Predicate<C>

returns true for changes whose application would have no effect, thereby equivalent to an identity function (Function#identity()) on the underlying model.

preventMergeDelay:Duration

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().

createSingleChangeUMback to summary
public default <C> UndoManager<C> createSingleChangeUM(EventStream<C> changeStream, Function<? super C, ? extends C> invert, Consumer<C> apply)

Creates an UndoManager that tracks changes emitted from changeStream.

Parameters
<C>
representation of a change
invert:Function<? super C, ? extends C>

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:Consumer<C>

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.

createSingleChangeUMback to summary
public default <C> UndoManager<C> createSingleChangeUM(EventStream<C> changeStream, Function<? super C, ? extends C> invert, Consumer<C> apply, BiFunction<C, C, Optional<C>> merge)

Creates an UndoManager that tracks and optionally merges changes emitted from changeStream.

Parameters
<C>
representation of a change
invert:Function<? super C, ? extends C>

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:Consumer<C>

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:BiFunction<C, C, Optional<C>>

Used to merge two subsequent changes into one. Returns an empty Optional when the changes cannot or should not be merged.

createSingleChangeUMback to summary
public default <C> UndoManager<C> createSingleChangeUM(EventStream<C> changeStream, Function<? super C, ? extends C> invert, Consumer<C> apply, BiFunction<C, C, Optional<C>> merge, Predicate<C> isIdentity)

Creates an UndoManager that tracks and optionally merges changes emitted from changeStream.

Parameters
<C>
representation of a change
invert:Function<? super C, ? extends C>

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:Consumer<C>

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:BiFunction<C, C, Optional<C>>

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:Predicate<C>

returns true for changes whose application would have no effect, thereby equivalent to an identity function (Function#identity()) on the underlying model.

createSingleChangeUMback to summary
public <C> UndoManager<C> createSingleChangeUM(EventStream<C> changeStream, Function<? super C, ? extends C> invert, Consumer<C> apply, BiFunction<C, C, Optional<C>> merge, Predicate<C> isIdentity, Duration preventMergeDelay)

Creates an UndoManager that tracks and optionally merges changes emitted from changeStream.

Parameters
<C>
representation of a change
invert:Function<? super C, ? extends C>

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:Consumer<C>

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:BiFunction<C, C, Optional<C>>

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:Predicate<C>

returns true for changes whose application would have no effect, thereby equivalent to an identity function (Function#identity()) on the underlying model.

preventMergeDelay:Duration

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().

fixedSizeHistoryFactoryback to summary
public static UndoManagerFactory fixedSizeHistoryFactory(int capacity)

Creates a factory for UndoManagers with bounded history. When at full capacity, a new change will cause the oldest change to be forgotten.

See Also
fixedSizeHistorySingleChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration, int), fixedSizeHistoryMultiChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration, int)
fixedSizeHistoryMultiChangeUMback to summary
public static <C> UndoManager<List<C>> fixedSizeHistoryMultiChangeUM(EventStream<List<C>> changeStream, Function<? super C, ? extends C> invert, Consumer<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:int

maximum number of changes the returned UndoManager can store

fixedSizeHistoryMultiChangeUMback to summary
public static <C> UndoManager<List<C>> fixedSizeHistoryMultiChangeUM(EventStream<List<C>> changeStream, Function<? super C, ? extends C> invert, Consumer<List<C>> apply, BiFunction<C, C, 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:int

maximum number of changes the returned UndoManager can store

fixedSizeHistoryMultiChangeUMback to summary
public static <C> UndoManager<List<C>> fixedSizeHistoryMultiChangeUM(EventStream<List<C>> changeStream, Function<? super C, ? extends C> invert, Consumer<List<C>> apply, BiFunction<C, C, Optional<C>> merge, Predicate<C> isIdentity, 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:int

maximum number of changes the returned UndoManager can store

fixedSizeHistorySingleChangeUMback to summary
public static <C> UndoManager<C> fixedSizeHistorySingleChangeUM(EventStream<C> changeStream, Function<? super C, ? extends C> invert, 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:int

maximum number of changes the returned UndoManager can store

fixedSizeHistorySingleChangeUMback to summary
public static <C> UndoManager<C> fixedSizeHistorySingleChangeUM(EventStream<C> changeStream, Function<? super C, ? extends C> invert, Consumer<C> apply, BiFunction<C, C, 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:int

maximum number of changes the returned UndoManager can store

fixedSizeHistorySingleChangeUMback to summary
public static <C> UndoManager<C> fixedSizeHistorySingleChangeUM(EventStream<C> changeStream, Function<? super C, ? extends C> invert, Consumer<C> apply, BiFunction<C, C, Optional<C>> merge, Predicate<C> isIdentity, 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:int

maximum number of changes the returned UndoManager can store

unlimitedHistoryFactoryback to summary
public static UndoManagerFactory unlimitedHistoryFactory()

Creates a factory for UndoManagers with unlimited history.

See Also
unlimitedHistorySingleChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration), unlimitedHistoryMultiChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration)
unlimitedHistoryMultiChangeUMback to summary
public static <C> UndoManager<List<C>> unlimitedHistoryMultiChangeUM(EventStream<List<C>> changeStream, Function<? super C, ? extends C> invert, Consumer<List<C>> apply)

Creates an UndoManager with unlimited history. For description of parameters, see createMultiChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).

unlimitedHistoryMultiChangeUMback to summary
public static <C> UndoManager<List<C>> unlimitedHistoryMultiChangeUM(EventStream<List<C>> changeStream, Function<? super C, ? extends C> invert, Consumer<List<C>> apply, BiFunction<C, C, Optional<C>> merge)

Creates an UndoManager with unlimited history. For description of parameters, see createMultiChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).

unlimitedHistoryMultiChangeUMback to summary
public static <C> UndoManager<List<C>> unlimitedHistoryMultiChangeUM(EventStream<List<C>> changeStream, Function<? super C, ? extends C> invert, Consumer<List<C>> apply, BiFunction<C, C, Optional<C>> merge, Predicate<C> isIdentity)

Creates an UndoManager with unlimited history. For description of parameters, see createMultiChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).

unlimitedHistoryMultiChangeUMback to summary
public static <C> UndoManager<List<C>> unlimitedHistoryMultiChangeUM(EventStream<List<C>> changeStream, Function<? super C, ? extends C> invert, Consumer<List<C>> apply, BiFunction<C, C, Optional<C>> merge, Predicate<C> isIdentity, Duration preventMergeDelay)

Creates an UndoManager with unlimited history. For description of parameters, see createMultiChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).

unlimitedHistorySingleChangeUMback to summary
public static <C> UndoManager<C> unlimitedHistorySingleChangeUM(EventStream<C> changeStream, Function<? super C, ? extends C> invert, Consumer<C> apply)

Creates an UndoManager with unlimited history. For description of parameters, see createSingleChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).

unlimitedHistorySingleChangeUMback to summary
public static <C> UndoManager<C> unlimitedHistorySingleChangeUM(EventStream<C> changeStream, Function<? super C, ? extends C> invert, Consumer<C> apply, BiFunction<C, C, Optional<C>> merge)

Creates an UndoManager with unlimited history. For description of parameters, see createSingleChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).

unlimitedHistorySingleChangeUMback to summary
public static <C> UndoManager<C> unlimitedHistorySingleChangeUM(EventStream<C> changeStream, Function<? super C, ? extends C> invert, Consumer<C> apply, BiFunction<C, C, Optional<C>> merge, Predicate<C> isIdentity)

Creates an UndoManager with unlimited history. For description of parameters, see createSingleChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).

unlimitedHistorySingleChangeUMback to summary
public static <C> UndoManager<C> unlimitedHistorySingleChangeUM(EventStream<C> changeStream, Function<? super C, ? extends C> invert, Consumer<C> apply, BiFunction<C, C, Optional<C>> merge, Predicate<C> isIdentity, Duration preventMergeDelay)

Creates an UndoManager with unlimited history. For description of parameters, see createSingleChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).

zeroHistoryFactoryback to summary
public static UndoManagerFactory zeroHistoryFactory()

Creates a factory for UndoManagers with no history.

See Also
zeroHistorySingleChangeUM(EventStream), zeroHistoryMultiChangeUM(EventStream)
zeroHistoryMultiChangeUMback to summary
public static <C> UndoManager<List<C>> zeroHistoryMultiChangeUM(EventStream<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).

zeroHistorySingleChangeUMback to summary
public static <C> UndoManager<C> zeroHistorySingleChangeUM(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).