Modifier and Type | Field and Description |
---|---|
protected FutureTask<Result> |
evaluationTask |
Constructor and Description |
---|
AbstractRule(String id,
String name,
String topic,
org.openjdk.jmc.common.util.TypedPreference<?>... configAttributes) |
Modifier and Type | Method and Description |
---|---|
RunnableFuture<Result> |
evaluate(org.openjdk.jmc.common.item.IItemCollection items,
org.openjdk.jmc.common.util.IPreferenceValueProvider valueProvider)
Gets a future representing the result of the evaluation of this rule.
|
Collection<org.openjdk.jmc.common.util.TypedPreference<?>> |
getConfigurationAttributes()
Gets information about which attributes may be configured during rule evaluation.
|
String |
getId() |
String |
getName() |
protected abstract Result |
getResult(org.openjdk.jmc.common.item.IItemCollection items,
org.openjdk.jmc.common.util.IPreferenceValueProvider vp) |
String |
getTopic() |
protected FutureTask<Result> evaluationTask
protected abstract Result getResult(org.openjdk.jmc.common.item.IItemCollection items, org.openjdk.jmc.common.util.IPreferenceValueProvider vp)
public RunnableFuture<Result> evaluate(org.openjdk.jmc.common.item.IItemCollection items, org.openjdk.jmc.common.util.IPreferenceValueProvider valueProvider)
IRule
evaluate
in interface IRule
items
- items to evaluatevalueProvider
- Provider of configuration values used for evaluation. The attributes that will be
asked for from the provider should be provided by
IRule.getConfigurationAttributes()
.public Collection<org.openjdk.jmc.common.util.TypedPreference<?>> getConfigurationAttributes()
IRule
getConfigurationAttributes
in interface IRule
public String getId()
public String getName()
Copyright © 2020. All rights reserved.