Interface DiffContext<T,K extends java.lang.Comparable>
- Type Parameters:
T- Value typeK- Key type
public interface DiffContext<T,K extends java.lang.Comparable>
Implementors of this interface support being notified of changes to an ordered array.
-
Method Summary
Modifier and Type Method Description voidadded(K newDocId, T newDoc)A document with the specified ID has been added.voidaddedBefore(K newDocId, T newDoc, K beforeId)Indicates that the new document with the given ID should be inserted before the givenbeforeId.java.util.function.Function<T,K>getKeyer()default java.lang.Objectlock()voidmovedBefore(K id, K beforeId)voidpossiblyChanged(K newDocId, T oldDoc, T newDoc)voidremoved(K id)Indicates that the given ID should be removed.
-
Method Details
-
removed
Indicates that the given ID should be removed.- Parameters:
id- The ID of the record to remove.
-
addedBefore
Indicates that the new document with the given ID should be inserted before the givenbeforeId. IfbeforeIdisnull, this document should be added to the very end of the list.- Parameters:
newDocId-newDoc-beforeId- The document to insertnewDocbefore, ornullif the document should be added to the end of the list.
-
added
A document with the specified ID has been added.- Parameters:
newDocId-newDoc-
-
possiblyChanged
-
movedBefore
-
getKeyer
-
lock
default java.lang.Object lock()
-