Interface ObjectScalingMethod
public interface ObjectScalingMethod
A way to scale a group of
ObjectMasks, scaling each object independently or collectively.- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescription<T> Map<T, T> scaleElements(List<T> elements, ScaleFactor scaleFactor, Optional<UnaryOperator<T>> preOperation, Optional<UnaryOperator<T>> postOperation, AccessObjectMask<T> access) Applies a scaling factor to elements, where each element is associated with a uniqueObjectMask.default <T> Map<T, T> scaleElements(List<T> elements, ScaleFactor scaleFactor, AccessObjectMask<T> access) Applies a scaling factor to elements, where each element is associated with a uniqueObjectMask.
-
Method Details
-
scaleElements
default <T> Map<T,T> scaleElements(List<T> elements, ScaleFactor scaleFactor, AccessObjectMask<T> access) throws OperationFailedException Applies a scaling factor to elements, where each element is associated with a uniqueObjectMask.- Type Parameters:
T- the element-type, which must have a sensibleObject.hashCode()andObject.equals(java.lang.Object)implementation.- Parameters:
elements- the collection of input elements, whose associatedObjectMasks will be scaled.scaleFactor- how much to scale by.access- means of retrieving theObjectMaskthat is associated withTand to create new derived elements.- Returns:
- a map from input-element (unscaled) to the corresponding output-element (scaled).
- Throws:
OperationFailedException- if any aspect of the parameterization is unsupported by the method.
-
scaleElements
<T> Map<T,T> scaleElements(List<T> elements, ScaleFactor scaleFactor, Optional<UnaryOperator<T>> preOperation, Optional<UnaryOperator<T>> postOperation, AccessObjectMask<T> access) throws OperationFailedException Applies a scaling factor to elements, where each element is associated with a uniqueObjectMask.- Type Parameters:
T- the element-type, which must have a sensibleObject.hashCode()andObject.equals(java.lang.Object)implementation.- Parameters:
elements- the collection of input elements, whose associatedObjectMasks will be scaled.scaleFactor- how much to scale by.preOperation- an optional operation applied to an element before scaling.postOperation- an optional operation applied to an element after scaling.access- means of retrieving theObjectMaskthat is associated withTand to create new derived elements.- Returns:
- a map from input-element (unscaled) to the corresponding output-element (scaled).
- Throws:
OperationFailedException- if any aspect of the parameterization is unsupported by the method.
-