org.reactfx.collection.ListModificationSequence Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of reactfx Show documentation
Show all versions of reactfx Show documentation
Reactive event streams for JavaFX
package org.reactfx.collection;
import java.util.Iterator;
import java.util.List;
import org.reactfx.util.Lists;
/**
* Common supertype for {@link QuasiListChange} and {@link ListChangeAccumulator}.
*
* @param type of list elements
*/
public interface ListModificationSequence
extends AbstractListModificationSequence> {
/**
* May be destructive for this object. Therefore, this object should not
* be used after the call to this method, unless stated otherwise by the
* implementing class/interface.
*/
QuasiListChange asListChange();
/**
* May be destructive for this object. Therefore, this object should not
* be used after the call to this method, unless stated otherwise by the
* implementing class/interface.
*/
ListChangeAccumulator asListChangeAccumulator();
}
interface AbstractListModificationSequence>
extends Iterable {
List extends M> getModifications();
@Override
default Iterator iterator() {
return Lists.readOnlyIterator(getModifications());
}
default int getModificationCount() {
return getModifications().size();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy