NumberMultiplier entry processor.

Type Parameters

  • K = any

    the type of the Map entry key

  • V = any

    the type of the Map entry value

Hierarchy

Constructors

  • Construct an NumberMultiplier processor that will multiply a property value by a specified factor, returning either the old or the new value as specified.

    Type Parameters

    • K = any

    • V = any

    Parameters

    • nameOrManipulator: string | ValueManipulator

      the ValueManipulator or the property name

    • multiplier: number

      the Number representing the magnitude and sign of the multiplier

    • postMultiplication: boolean = false

      pass true to return the value as it was before it was multiplied, or pass false to return the value as it is after it is multiplied

    Returns NumberMultiplier<K, V>

Properties

@class: string
manipulator: ValueManipulator

The property value manipulator.

multiplier: number

The number to multiply by.

postMultiplication: boolean

Whether to return the value before it was multiplied (post-factor) or after it is multiplied (pre-factor).

Methods

  • Returns a ConditionalProcessor comprised of this processor and the provided filter.

    The specified entry processor gets invoked if and only if the filter applied to the entry evaluates to true; otherwise the result of the invocation will return null.

    Parameters

    Returns EntryProcessor<K, V, number>