public final class FunctionalContentProvider
extends java.lang.Object
implements org.eclipse.jface.viewers.IStructuredContentProvider
IStructuredContentProvider
implementation that uses
a delegate Function
as element provider.Modifier and Type | Field and Description |
---|---|
private java.util.function.Function<java.lang.Object,java.lang.Object[]> |
delegate
Delegate function used to retrieve content.
|
Constructor and Description |
---|
FunctionalContentProvider(java.util.function.Function<java.lang.Object,java.lang.Object[]> delegate)
Default constructor.
|
FunctionalContentProvider(java.util.function.Supplier<java.util.List<?>> supplier)
Default constructor that uses a given suplier as
a function.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
java.lang.Object[] |
getElements(java.lang.Object inputElement) |
void |
inputChanged(org.eclipse.jface.viewers.Viewer viewer,
java.lang.Object oldInput,
java.lang.Object newInput) |
private final java.util.function.Function<java.lang.Object,java.lang.Object[]> delegate
public FunctionalContentProvider(java.util.function.Supplier<java.util.List<?>> supplier)
supplier
- Supplier instance that is transformed into a valid provider function.public FunctionalContentProvider(java.util.function.Function<java.lang.Object,java.lang.Object[]> delegate)
delegate
- Delegate function used to retrieve content.public void dispose()
dispose
in interface org.eclipse.jface.viewers.IContentProvider
public void inputChanged(org.eclipse.jface.viewers.Viewer viewer, java.lang.Object oldInput, java.lang.Object newInput)
inputChanged
in interface org.eclipse.jface.viewers.IContentProvider
public java.lang.Object[] getElements(java.lang.Object inputElement)
getElements
in interface org.eclipse.jface.viewers.IStructuredContentProvider