* @param newDeltas the deltas that have been applied since the last call to
* appendDeltas.
*/
public void appendDeltas(ReadableWaveletData updatedSnapshot,
DeltaSequence newDeltas) {
HashedVersion newEndVersion = newDeltas.getEndVersion();
Preconditions.checkArgument(
!newDeltas.isEmpty(), "There were no new deltas passed to appendDeltas");
Preconditions.checkArgument(updatedSnapshot.getVersion() == newEndVersion.getVersion(),
String.format("Version of snapshot %s doesn't match the HashedVersion %s",
updatedSnapshot.getVersion(), newEndVersion));
Preconditions.checkArgument(areContiguousToCurrentVersion(newDeltas), String.format(
"Deltas are not contiguous to the current version(%s) %s", getVersionAfterDeltas(), deltas));
WaveletName updatedWaveletName = WaveletDataUtil.waveletNameOf(updatedSnapshot);