com.alibaba.fastjson2.function.FieldBiConsumer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fastjson2 Show documentation
Show all versions of fastjson2 Show documentation
Fastjson is a JSON processor (JSON parser + JSON generator) written in Java
package com.alibaba.fastjson2.function;
import java.util.function.BiConsumer;
public final class FieldBiConsumer
implements BiConsumer {
public final int fieldIndex;
public final FieldConsumer consumer;
public FieldBiConsumer(int fieldIndex, FieldConsumer consumer) {
this.fieldIndex = fieldIndex;
this.consumer = consumer;
}
@Override
public void accept(T object, Object fieldValue) {
consumer.accept(object, fieldIndex, fieldValue);
}
}