public class MappedList<A,B>
This is a variant of EasyBind.map where the mapped list is backed, therefore the mapping function will only be run when an element is inserted or updated. Use this instead of EasyBind.map to trade off memory vs CPU, or if (god forbid) the mapped function is side-effecting.
Constructor and Description |
---|
MappedList(javafx.collections.ObservableList<A> list,
kotlin.jvm.functions.Function1<? super A,? extends B> function)
This is a variant of EasyBind.map where the mapped list is backed, therefore the mapping function will only be run
when an element is inserted or updated.
Use this instead of EasyBind.map to trade off memory vs CPU, or if (god forbid) the mapped function is side-effecting.
|
Modifier and Type | Method and Description |
---|---|
B |
get(int index) |
kotlin.jvm.functions.Function1<A,B> |
getFunction() |
int |
getSize() |
int |
getSourceIndex(int index) |
java.lang.Object |
remove(int p) |
java.lang.Object |
removeAt(int p) |
int |
size() |
void |
sourceChanged(javafx.collections.ListChangeListener.Change<? extends A> change) |
public MappedList(javafx.collections.ObservableList<A> list, kotlin.jvm.functions.Function1<? super A,? extends B> function)
This is a variant of EasyBind.map where the mapped list is backed, therefore the mapping function will only be run when an element is inserted or updated. Use this instead of EasyBind.map to trade off memory vs CPU, or if (god forbid) the mapped function is side-effecting.
public void sourceChanged(javafx.collections.ListChangeListener.Change<? extends A> change)
public B get(int index)
public int getSize()
public int size()
public int getSourceIndex(int index)
public kotlin.jvm.functions.Function1<A,B> getFunction()
public java.lang.Object removeAt(int p)
public java.lang.Object remove(int p)