public static class UniDerivedAttributeLoaderBuilder.BuiltDerivedLoader<T,D> extends SimpleDerivedAttributeLoader<T,D>
myDependencymySpec| Constructor and Description |
|---|
BuiltDerivedLoader(AttributeSpec<T> spec,
AttributeSpec<? extends D> dependency,
boolean yield,
BiFunction<? super D,DerivedAttributeContext,? extends T> derivationFunction,
Function<D,ItemIdentity> trailFunction,
Set<AttributeContextDependency> contextDependencies,
AttributeCachingStrategy cachingStrategy,
TrailItemSet globalTrail) |
| Modifier and Type | Method and Description |
|---|---|
AttributeCachingStrategy |
getCachingStrategy()
Indicates how the values provided by this loader should be cached.
|
Set<AttributeContextDependency> |
getContextDependencies()
Indicates which context values are used to calculate the value of the attribute.
|
TrailItemSet |
getGlobalTrail()
Returns global trail.
|
protected T |
getValue(D value,
DerivedAttributeContext context) |
getAttributeDependencies, idLoader, loadValuegetAttributeSpec, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAttributeSpecpublic BuiltDerivedLoader(AttributeSpec<T> spec, AttributeSpec<? extends D> dependency, boolean yield, BiFunction<? super D,DerivedAttributeContext,? extends T> derivationFunction, Function<D,ItemIdentity> trailFunction, Set<AttributeContextDependency> contextDependencies, AttributeCachingStrategy cachingStrategy, TrailItemSet globalTrail)
@Nullable protected T getValue(@NotNull D value, DerivedAttributeContext context)
getValue in class SimpleDerivedAttributeLoader<T,D>@Nullable public Set<AttributeContextDependency> getContextDependencies()
AttributeLoaderIndicates which context values are used to calculate the value of the attribute.
For example, if the calculated value depends on the current user, the return value from this method must include
AttributeContextDependency.USER.
The returned value must be the same throughout the lifetime of the object.
null if there are none@Nullable public AttributeCachingStrategy getCachingStrategy()
AttributeLoaderIndicates how the values provided by this loader should be cached.
The returned value must be the same throughout the lifetime of the object.
null has the same effect as AttributeCachingStrategy.MAY@Nullable public TrailItemSet getGlobalTrail()
AttributeLoaderReturns global trail. When an item from a global trail changes, all values calculated for this attribute will be invalidated and will need to be recalculated.
The returned value must be the same throughout the lifetime of the object.
null if noneCopyright © 2022 ALM Works. All Rights Reserved.