com.almondtools.testrecorder.values.SerializedBigDecimal Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of testrecorder Show documentation
Show all versions of testrecorder Show documentation
Recording test data from running program.
The newest version!
package com.almondtools.testrecorder.values;
import java.lang.reflect.Type;
import java.math.BigDecimal;
import com.almondtools.testrecorder.SerializedImmutableVisitor;
import com.almondtools.testrecorder.SerializedValueVisitor;
public class SerializedBigDecimal extends SerializedImmutable {
public SerializedBigDecimal(Type type, Class> valueType) {
super(type, valueType);
}
@Override
public Class> getValueType() {
return BigDecimal.class;
}
@Override
public T accept(SerializedValueVisitor visitor) {
return visitor.as(SerializedImmutableVisitor.extend(visitor))
.map(v -> v.visitBigDecimal(this))
.orElseGet(() -> visitor.visitUnknown(this));
}
}