The NumberIncrementor entry processor is used to increment a property value of a numeric type.

Type Parameters

  • K = any

    the type of the Map entry key

  • V = any

    the type of the Map entry value

Hierarchy

Constructors

  • Construct an NumberIncrementor processor that will increment a property value by a specified amount, returning either the old or the new value as specified.

    Type Parameters

    • K = any

    • V = any

    Parameters

    • nameOrManipulator: string | ValueManipulator

      the ValueManipulator or property name

    • increment: number

      the Number representing the magnitude and sign of the increment

    • postIncrement: boolean = false

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

    Returns NumberIncrementor<K, V>

Properties

@class: string
increment: number

The number to increment by.

manipulator: ValueManipulator

The property value manipulator.

postIncrement: 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>