Interface ObjectScalingMethod


public interface ObjectScalingMethod
A way to scale a group of ObjectMasks, scaling each object independently or collectively.
Author:
Owen Feehan
  • 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 unique ObjectMask.
      Type Parameters:
      T - the element-type, which must have a sensible Object.hashCode() and Object.equals(java.lang.Object) implementation.
      Parameters:
      elements - the collection of input elements, whose associated ObjectMasks will be scaled.
      scaleFactor - how much to scale by.
      access - means of retrieving the ObjectMask that is associated with T and 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 unique ObjectMask.
      Type Parameters:
      T - the element-type, which must have a sensible Object.hashCode() and Object.equals(java.lang.Object) implementation.
      Parameters:
      elements - the collection of input elements, whose associated ObjectMasks 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 the ObjectMask that is associated with T and 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.