S
- final-type of CalculationPart
.T
- feature input-type as input to cached-calculations.U
- delegate-type of CalculationPart
.public abstract class CalculateInputFromDelegate<S,T extends FeatureInput,U> extends CalculationPart<S,T>
CalculationPart
s that derive from an existing "delegate" calculation.
These types of calculations involve two steps:
CalculationPart
.
Modifier | Constructor and Description |
---|---|
protected |
CalculateInputFromDelegate(CalculationPart<U,T> delegate,
CalculationPartResolver<T> cache) |
protected |
CalculateInputFromDelegate(ResolvedPart<U,T> delegate) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
protected abstract S |
deriveFromDelegate(T input,
U delegate) |
boolean |
equals(Object o) |
S |
execute(T input)
This performs the actual calculation when needed.
|
protected ResolvedPart<U,T> |
getDelegate() |
int |
hashCode() |
getOrCalculate, hasCachedResult, invalidate
protected CalculateInputFromDelegate(CalculationPart<U,T> delegate, CalculationPartResolver<T> cache)
protected CalculateInputFromDelegate(ResolvedPart<U,T> delegate)
public S execute(T input) throws FeatureCalculationException
CalculationPart
CalculationPart.invalidate()
is called.execute
in class CalculationPart<S,T extends FeatureInput>
input
- the input to the calculation.FeatureCalculationException
- if the calculation cannot be successfully completed.protected ResolvedPart<U,T> getDelegate()
public boolean equals(Object o)
equals
in class CalculationPart<S,T extends FeatureInput>
protected boolean canEqual(Object other)
public int hashCode()
hashCode
in class CalculationPart<S,T extends FeatureInput>
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.