protected Iterator<? extends ChildNodeEntry> getPage(long pos, int size) {
return getPersistentNodeState().getChildNodeEntries(pos, size).iterator();
}
});
final NodeDelta delta = getNodeDelta();
Iterator<ChildNodeEntry> unmodifiedEntries = Iterators.filter(persistedEntries,
new Predicate<ChildNodeEntry>() {
@Override
public boolean evaluate(ChildNodeEntry entry) {
return !delta.isNodeModified(entry.getName());
}
});
Iterator<TransientNodeState> unmodifiedStates = Iterators.map(unmodifiedEntries,
new Function1<ChildNodeEntry, TransientNodeState>() {
@Override
public TransientNodeState apply(ChildNodeEntry entry) {
return getNodeState(delta.getNode(entry.getName()));
}
});
Iterator<TransientNodeState> modifiedStates = Iterators.map(toIterable(delta.getNodes()).iterator(),
new Function1<NodeDelta, TransientNodeState>() {
@Override
public TransientNodeState apply(NodeDelta delta) {
return getNodeState(delta);
}