All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.almondtools.testrecorder.values.SerializedBigDecimal Maven / Gradle / Ivy

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));
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy