Class SessionInputSequential<T extends FeatureInput>
Object
SessionInputSequential<T>
- Type Parameters:
T- feature-type
- All Implemented Interfaces:
FeatureCalculationInput<T>
public class SessionInputSequential<T extends FeatureInput>
extends Object
implements FeatureCalculationInput<T>
A feature-input that will be used in a
SequentialSession- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionSessionInputSequential(T input, CacheCreator cacheCreator) Creates for a particular input andCacheCreator, otherwise using defaults.SessionInputSequential(T input, CacheCreator cacheCreator, ChildCacheFinder findChild) Creates for a particular input,CacheCreatorandChildCacheFinder. -
Method Summary
Modifier and TypeMethodDescriptionbySymbol()Calculates a feature if only an symbol (ID/name) is known, which refers to another feature.doubleCalculates the result of a feature using this input.calculate(FeatureList<T> features) Calculates the results of several features using this input.<S> Scalculate(ResolvedPart<S, T> calculation) Calculates a resolved Feature-calculation.<S> Scalculate(CalculationPart<S, T> cc) Calculates a feature-calculation after resolving it against the main cache.forChild()Performs calculations not on the main cache, but on a child cache.get()The underlying feature-input.getCache()Get the associatedFeatureCalculationCache.voidreplaceInput(T input) Replaces existing input with new inputresolver()A resolver for calculations.
-
Constructor Details
-
SessionInputSequential
Creates for a particular input andCacheCreator, otherwise using defaults.- Parameters:
input- input for feature calculation.cacheCreator- creates a cache.
-
SessionInputSequential
Creates for a particular input,CacheCreatorandChildCacheFinder.- Parameters:
input- input for feature calculation.cacheCreator- creates a cache.findChild- locates a particular child-cache.
-
-
Method Details
-
replaceInput
Replaces existing input with new input- Parameters:
input- new parameters which will replace existing ones
-
get
Description copied from interface:FeatureCalculationInputThe underlying feature-input.- Specified by:
getin interfaceFeatureCalculationInput<T extends FeatureInput>- Returns:
- the feature-input.
-
calculate
Description copied from interface:FeatureCalculationInputCalculates the result of a feature using this input.- Specified by:
calculatein interfaceFeatureCalculationInput<T extends FeatureInput>- Parameters:
feature- the feature to calculate with.- Returns:
- the result of the calculation.
- Throws:
FeatureCalculationException- if a feature cannot be successfully calculated.
-
calculate
Description copied from interface:FeatureCalculationInputCalculates the results of several features using this input.- Specified by:
calculatein interfaceFeatureCalculationInput<T extends FeatureInput>- Parameters:
features- features to calculate with.- Returns:
- the results of each feature's calculation respectively.
- Throws:
NamedFeatureCalculateException- if any feature cannot be successfully calculated.
-
calculate
Description copied from interface:FeatureCalculationInputCalculates a feature-calculation after resolving it against the main cache.- Specified by:
calculatein interfaceFeatureCalculationInput<T extends FeatureInput>- Type Parameters:
S- return-type of the calculation.- Parameters:
cc- the feature-calculation to resolve.- Returns:
- the result of the calculation.
- Throws:
FeatureCalculationException- if a feature cannot be successfully calculated.
-
calculate
Description copied from interface:FeatureCalculationInputCalculates a resolved Feature-calculation.- Specified by:
calculatein interfaceFeatureCalculationInput<T extends FeatureInput>- Type Parameters:
S- return-type of the calculation.- Parameters:
calculation- the feature-calculation to resolve.- Returns:
- the result of the calculation.
- Throws:
FeatureCalculationException- if a feature cannot be successfully calculated.
-
resolver
Description copied from interface:FeatureCalculationInputA resolver for calculations.- Specified by:
resolverin interfaceFeatureCalculationInput<T extends FeatureInput>- Returns:
- the resolver.
-
bySymbol
Description copied from interface:FeatureCalculationInputCalculates a feature if only an symbol (ID/name) is known, which refers to another feature.- Specified by:
bySymbolin interfaceFeatureCalculationInput<T extends FeatureInput>- Returns:
- the calculator.
-
forChild
Description copied from interface:FeatureCalculationInputPerforms calculations not on the main cache, but on a child cache.- Specified by:
forChildin interfaceFeatureCalculationInput<T extends FeatureInput>- Returns:
- the calculator.
-
getCache
Description copied from interface:FeatureCalculationInputGet the associatedFeatureCalculationCache.- Specified by:
getCachein interfaceFeatureCalculationInput<T extends FeatureInput>- Returns:
- the associated cache.
-