Top Description Methods
org.apache.logging.log4j.message

public Interface ParameterVisitable

Known Direct Implementers
org.apache.logging.log4j.message.ReusableObjectMessage, org.apache.logging.log4j.message.ReusableParameterizedMessage, org.apache.logging.log4j.message.ReusableSimpleMessage
Annotations
@PerformanceSensitive:allocation
Imports
org.apache.logging.log4j.util.PerformanceSensitive

Allows message parameters to be iterated over without any allocation or memory copies.
Since
2.11

Method Summary

Modifier and TypeMethod and Description
public <
type of the third parameter
S
>
void
forEachParameter(ParameterConsumer<S>
The action to be performed for each key-value pair in this collection
action
,
S
the object to be passed as the third parameter to each invocation on the specified ParameterConsumer.
state
)

Performs the given action for each parameter until all values have been processed or the action throws an exception.

Method Detail

forEachParameterback to summary
public <S> void forEachParameter(ParameterConsumer<S> action, S state)

Performs the given action for each parameter until all values have been processed or the action throws an exception.

The second parameter lets callers pass in a stateful object to be modified with the key-value pairs, so the TriConsumer implementation itself can be stateless and potentially reusable.

Parameters
<S>
type of the third parameter
action:ParameterConsumer<S>

The action to be performed for each key-value pair in this collection

state:S

the object to be passed as the third parameter to each invocation on the specified ParameterConsumer.

Since
2.11