Class DiffResult
java.lang.Object
com.ultikits.ultitools.abstracts.gui.declarative.core.DiffResult
DiffResult represents the difference between two renders.
It holds every change that must be applied to the Inventory:
- added - newly added RenderNodes
- removed - deleted RenderNodes
- updated - RenderNodes whose content changed (same position)
- moved - RenderNodes whose position changed
- Since:
- 6.2.0
- Version:
- 1.0.0
- Author:
- UltiTools Team
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for DiffResult.static classRepresents a single node move.static classRepresents a single node update. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @NotNull List<RenderNode> private final @NotNull List<DiffResult.RenderNodeMove> private final @NotNull List<RenderNode> private final @NotNull List<DiffResult.RenderNodeUpdate> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull DiffResult.Builderbuilder()Creates a new Builder.static @NotNull DiffResultempty()Creates an empty DiffResult.@NotNull List<RenderNode> getAdded()intGets the total number of changes.@NotNull List<DiffResult.RenderNodeMove> getMoved()@NotNull List<RenderNode> @NotNull List<DiffResult.RenderNodeUpdate> booleanisEmpty()Checks whether there are any changes.toString()
-
Field Details
-
added
-
removed
-
updated
-
moved
-
-
Constructor Details
-
DiffResult
-
-
Method Details
-
empty
Creates an empty DiffResult.- Returns:
- an empty DiffResult
-
builder
Creates a new Builder.- Returns:
- the Builder
-
getAdded
-
getRemoved
-
getUpdated
-
getMoved
-
isEmpty
public boolean isEmpty()Checks whether there are any changes.- Returns:
- true if there are no changes
-
getChangeCount
public int getChangeCount()Gets the total number of changes.- Returns:
- the total change count
-
toString
-