public final class ChangeSet
extends java.lang.Object
SectionTree.Target
as the result
of an update of a Section
. A ChangeSet is provided in the OnDiff
of a DiffSectionSpec
to allow the ChangeSetSpec to define its changes based on old/new props and
state.Modifier and Type | Method and Description |
---|---|
static ChangeSet |
acquireChangeSet(Section section,
boolean enableStats) |
void |
addChange(Change change)
Add a new Change to this ChangeSet.
|
void |
delete(int index) |
void |
delete(int index,
java.lang.Object data) |
void |
deleteRange(int index,
int count) |
void |
deleteRange(int index,
int count,
java.util.List<?> data) |
Change |
getChangeAt(int index) |
int |
getChangeCount() |
com.facebook.litho.sections.ChangeSet.ChangeSetStats |
getChangeSetStats() |
void |
insert(int index,
RenderInfo renderInfo,
TreeProps treeProps) |
void |
insert(int index,
RenderInfo renderInfo,
TreeProps treeProps,
java.lang.Object data) |
void |
insertRange(int index,
int count,
java.util.List<RenderInfo> renderInfos,
TreeProps treeProps) |
void |
insertRange(int index,
int count,
java.util.List<RenderInfo> renderInfos,
TreeProps treeProps,
java.util.List<?> data) |
void |
move(int fromIndex,
int toIndex) |
void |
move(int fromIndex,
int toIndex,
java.lang.Object data) |
void |
update(int index,
RenderInfo renderInfo,
TreeProps treeProps) |
void |
update(int index,
RenderInfo renderInfo,
TreeProps treeProps,
java.lang.Object prevData,
java.lang.Object nextData) |
void |
updateRange(int index,
int count,
java.util.List<RenderInfo> renderInfos,
TreeProps treeProps) |
void |
updateRange(int index,
int count,
java.util.List<RenderInfo> renderInfos,
TreeProps treeProps,
java.util.List<?> prevData,
java.util.List<?> nextData) |
public int getChangeCount()
Change
s in this ChangeSet.public void addChange(Change change)
public void insert(int index, RenderInfo renderInfo, TreeProps treeProps)
public void insert(int index, RenderInfo renderInfo, TreeProps treeProps, java.lang.Object data)
public void insertRange(int index, int count, java.util.List<RenderInfo> renderInfos, TreeProps treeProps)
public void insertRange(int index, int count, java.util.List<RenderInfo> renderInfos, TreeProps treeProps, java.util.List<?> data)
public void update(int index, RenderInfo renderInfo, TreeProps treeProps)
public void update(int index, RenderInfo renderInfo, TreeProps treeProps, java.lang.Object prevData, java.lang.Object nextData)
public void updateRange(int index, int count, java.util.List<RenderInfo> renderInfos, TreeProps treeProps)
public void updateRange(int index, int count, java.util.List<RenderInfo> renderInfos, TreeProps treeProps, java.util.List<?> prevData, java.util.List<?> nextData)
public void delete(int index)
public void delete(int index, java.lang.Object data)
public void deleteRange(int index, int count)
public void deleteRange(int index, int count, java.util.List<?> data)
public void move(int fromIndex, int toIndex)
public void move(int fromIndex, int toIndex, java.lang.Object data)
public com.facebook.litho.sections.ChangeSet.ChangeSetStats getChangeSetStats()