public interface InfoPanelItemProvider
InfoPanelItem
s.Modifier and Type | Method and Description |
---|---|
static <T extends InfoPanelItem> |
contributeIf(boolean predicate,
java.util.function.Supplier<T> supplier)
Helper method to create the Contributions Collection.
|
Collection<? extends InfoPanelItem> |
getContributions(GraphContainer container)
Returns all contributions for the current state of the given container.
|
Collection<? extends InfoPanelItem> getContributions(GraphContainer container)
container
- the container used to decide which contributions to showstatic <T extends InfoPanelItem> Collection<T> contributeIf(boolean predicate, java.util.function.Supplier<T> supplier)
predicate
is true
a singleton Collection with the value of Supplier.get()
is returned.
If predicate
is false
an empty Collection is returned, instead.T
- The type of the InfoPanelItem
predicate
- Whether or not the value of Supplier.get()
is used (true
means it is used)supplier
- The supplier to use. If predicate
is true
it must NOT be nullSupplier.get()
if predicate
is true
, otherwise an empty collectionCopyright © 2021. All rights reserved.