Show / Hide Table of Contents

Class NumberMultiplier

The NumberMultiplier entry processor is used to multiply a property value of a Byte, Int16, Int32, Int64, Single, Double, BigInteger and BigDecimal type.

Inheritance
object
AbstractProcessor
PropertyProcessor
NumberMultiplier
Implements
IEntryProcessor
IPortableObject
Inherited Members
PropertyProcessor.Get(IInvocableCacheEntry)
PropertyProcessor.Set(IInvocableCacheEntry, object)
PropertyProcessor.Equals(object)
PropertyProcessor.GetHashCode()
PropertyProcessor.ToString()
PropertyProcessor.m_manipulator
AbstractProcessor.ProcessAll(ICollection)
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Tangosol.Util.Processor
Assembly: Coherence.dll
Syntax
public class NumberMultiplier : PropertyProcessor, IEntryProcessor, IPortableObject

Constructors

NumberMultiplier()

Default constructor.

Declaration
public NumberMultiplier()

NumberMultiplier(string, object, bool)

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

Declaration
public NumberMultiplier(string name, object numInc, bool postIncrement)
Parameters
Type Name Description
string name

The property name.

object numInc

The object representing the magnitude and sign of the multiplier.

bool postIncrement

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.

Remarks

The .NET type of the original property value will dictate the way the specified factor is interpreted. For example, applying a factor of Double(0.5) to a property value of Int32(4) will result in a new property value of Int32(2).

If the original property value is null, the .NET type of the numFactor parameter will dictate the .NET type of the new value.

NumberMultiplier(PropertyManipulator, object, bool)

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

Declaration
public NumberMultiplier(PropertyManipulator manipulator, object numInc, bool postIncrement)
Parameters
Type Name Description
PropertyManipulator manipulator

The PropertyManipulator; could be null.

object numInc

The object representing the magnitude and sign of the multiplier.

bool postIncrement

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.

Remarks

The .NET type of the original property value will dictate the way the specified factor is interpreted. For example, applying a factor of Double(0.5) to a property value of Int32(4) will result in a new property value of Int32(2).

If the original property value is null, the .NET type of the numFactor parameter will dictate the .NET type of the new value.

Properties

Description

Returns this PropertyProcessor's description.

Declaration
protected override string Description { get; }
Property Value
Type Description
string

This PropertyProcessor's description.

Overrides
PropertyProcessor.Description

Methods

Process(IInvocableCacheEntry)

Process an IInvocableCacheEntry.

Declaration
public override object Process(IInvocableCacheEntry entry)
Parameters
Type Name Description
IInvocableCacheEntry entry

The IInvocableCacheEntry to process.

Returns
Type Description
object

The result of the processing, if any.

Overrides
AbstractProcessor.Process(IInvocableCacheEntry)

ReadExternal(IPofReader)

Restore the contents of a user type instance by reading its state using the specified IPofReader object.

Declaration
public override void ReadExternal(IPofReader reader)
Parameters
Type Name Description
IPofReader reader

The IPofReader from which to read the object's state.

Overrides
PropertyProcessor.ReadExternal(IPofReader)
Exceptions
Type Condition
IOException

If an I/O error occurs.

WriteExternal(IPofWriter)

Save the contents of a POF user type instance by writing its state using the specified IPofWriter object.

Declaration
public override void WriteExternal(IPofWriter writer)
Parameters
Type Name Description
IPofWriter writer

The IPofWriter to which to write the object's state.

Overrides
PropertyProcessor.WriteExternal(IPofWriter)
Exceptions
Type Condition
IOException

If an I/O error occurs.

Implements

IEntryProcessor
IPortableObject
In this article
Back to top Copyright © 2000, 2024, Oracle and/or its affiliates.