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,CacheCreator
andChildCacheFinder
. -
Method Summary
Modifier and TypeMethodDescriptionbySymbol()
Calculates a feature if only an symbol (ID/name) is known, which refers to another feature.double
Calculates the result of a feature using this input.calculate
(FeatureList<T> features) Calculates the results of several features using this input.<S> S
calculate
(ResolvedPart<S, T> calculation) Calculates a resolved Feature-calculation.<S> S
calculate
(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
.void
replaceInput
(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,CacheCreator
andChildCacheFinder
.- 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:FeatureCalculationInput
The underlying feature-input.- Specified by:
get
in interfaceFeatureCalculationInput<T extends FeatureInput>
- Returns:
- the feature-input.
-
calculate
Description copied from interface:FeatureCalculationInput
Calculates the result of a feature using this input.- Specified by:
calculate
in 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:FeatureCalculationInput
Calculates the results of several features using this input.- Specified by:
calculate
in 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:FeatureCalculationInput
Calculates a feature-calculation after resolving it against the main cache.- Specified by:
calculate
in 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:FeatureCalculationInput
Calculates a resolved Feature-calculation.- Specified by:
calculate
in 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:FeatureCalculationInput
A resolver for calculations.- Specified by:
resolver
in interfaceFeatureCalculationInput<T extends FeatureInput>
- Returns:
- the resolver.
-
bySymbol
Description copied from interface:FeatureCalculationInput
Calculates a feature if only an symbol (ID/name) is known, which refers to another feature.- Specified by:
bySymbol
in interfaceFeatureCalculationInput<T extends FeatureInput>
- Returns:
- the calculator.
-
forChild
Description copied from interface:FeatureCalculationInput
Performs calculations not on the main cache, but on a child cache.- Specified by:
forChild
in interfaceFeatureCalculationInput<T extends FeatureInput>
- Returns:
- the calculator.
-
getCache
Description copied from interface:FeatureCalculationInput
Get the associatedFeatureCalculationCache
.- Specified by:
getCache
in interfaceFeatureCalculationInput<T extends FeatureInput>
- Returns:
- the associated cache.
-