Class BaseDerivedAttributeLoader<T>
Object
BaseAttributeLoader<T>
BaseDerivedAttributeLoader<T>
- All Implemented Interfaces:
AttributeLoader<T>,DerivedAttributeLoader<T>
public class BaseDerivedAttributeLoader<T>
extends BaseAttributeLoader<T>
implements DerivedAttributeLoader<T>
-
Constructor Summary
ConstructorsConstructorDescriptionBaseDerivedAttributeLoader(AttributeSpec<T> attributeSpec, Set<AttributeSpec<?>> dependencies, Set<AttributeContextDependency> contextDependencies, AttributeCachingStrategy cachingStrategy, TrailItemSet globalTrail, Function<DerivedAttributeContext, AttributeValue<T>> loadingFunction) -
Method Summary
Modifier and TypeMethodDescriptionloadValue(DerivedAttributeContext context) Performs the loading.Methods inherited from class BaseAttributeLoader
getAttributeDependencies, getAttributeSpec, getCachingStrategy, getContextDependencies, getGlobalTrailMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AttributeLoader
getAttributeDependencies, getAttributeSpec, getCachingStrategy, getContextDependencies, getGlobalTrail
-
Constructor Details
-
BaseDerivedAttributeLoader
public BaseDerivedAttributeLoader(@NotNull AttributeSpec<T> attributeSpec, @Nullable Set<AttributeSpec<?>> dependencies, @Nullable Set<AttributeContextDependency> contextDependencies, @Nullable AttributeCachingStrategy cachingStrategy, @Nullable TrailItemSet globalTrail, @NotNull Function<DerivedAttributeContext, AttributeValue<T>> loadingFunction)
-
-
Method Details
-
loadValue
Description copied from interface:DerivedAttributeLoaderPerforms the loading.
If the value is missing or empty, the loader should return
AttributeValue.undefined(). If for some reason this loader is not applicable for the given row, it should returnnull.- Specified by:
loadValuein interfaceDerivedAttributeLoader<T>- Parameters:
context- loading context- Returns:
- the calculated value
-