Class AbstractScanningLoader<T>
Object
AbstractAttributeLoader<T>
AbstractScanningLoader<T>
- Type Parameters:
 T-
- All Implemented Interfaces:
 AttributeLoader<T>,MultiRowAttributeLoader<T>,RowAttributeLoader<T>,ScanningAttributeLoader<T>
- Direct Known Subclasses:
 ScanningLongSumLoader,ScanningNumberSumLoader
public abstract class AbstractScanningLoader<T>
extends AbstractAttributeLoader<T>
implements ScanningAttributeLoader<T>
Base class for scanning loaders that support standard options "baseLevel" and "levels".
 Note that implementation relies on the fact that the value T is immutable and can be shared among multiple rows.
- 
Field Summary
Fields inherited from class AbstractAttributeLoader
mySpec - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected AttributeValue<T>carryPrecedingValueForSkippedRow(AttributeValue<T> precedingValue) protected Integerprotected IntListprotected booleanisAboveBaseLevel(ScanningAttributeContext context) protected booleanisLevelSkipped(ScanningAttributeContext context) protected booleanisRowSkipped(AttributeValue<T> precedingValue, ScanningAttributeContext context) loadValue(AttributeValue<T> precedingValue, ScanningAttributeContext context) Performs scanning loading.protected abstract TloadValueForPassingRow(T precedingValue, ScanningAttributeContext context) Methods inherited from class AbstractAttributeLoader
getAttributeSpec, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface AttributeLoader
getAttributeDependencies, getAttributeSpec, getContextDependencies, getGlobalTrailMethods inherited from interface MultiRowAttributeLoader
getCachingStrategyMethods inherited from interface RowAttributeLoader
isWholeForestDependent, preload 
- 
Constructor Details
- 
AbstractScanningLoader
 
 - 
 - 
Method Details
- 
isLevelSkipped
 - 
isAboveBaseLevel
 - 
getBaseLevel
 - 
getLevelsSorted
@Nullable protected IntList getLevelsSorted() - 
loadValue
@Nullable public AttributeValue<T> loadValue(@NotNull AttributeValue<T> precedingValue, @NotNull ScanningAttributeContext context) Description copied from interface:ScanningAttributeLoaderPerforms scanning loading. Must be a pure function - see
ScanningAttributeLoader.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. (Note, however, that if multiple scanning loaders work on the same attribute, it could be tricky and lead to unexpected results.)- Specified by:
 loadValuein interfaceScanningAttributeLoader<T>- Parameters:
 precedingValue- the value of this attribute for the immediately preceding row, orAttributeValue.undefined()for the very first rowcontext- loading context- Returns:
 - the calculated value
 
 - 
loadValueForPassingRow
@Nullable protected abstract T loadValueForPassingRow(@Nullable T precedingValue, ScanningAttributeContext context)  - 
isRowSkipped
 - 
carryPrecedingValueForSkippedRow
 
 -