io.github.vmzakharov.ecdataframe.dataframe.DfDecimalColumnStored Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dataframe-ec Show documentation
Show all versions of dataframe-ec Show documentation
A tabular data structure based on the Eclipse Collections framework
package io.github.vmzakharov.ecdataframe.dataframe;
import io.github.vmzakharov.ecdataframe.dsl.value.DecimalValue;
import io.github.vmzakharov.ecdataframe.dsl.value.Value;
import org.eclipse.collections.api.list.ListIterable;
import java.math.BigDecimal;
public class DfDecimalColumnStored
extends DfObjectColumnStored
implements DfDecimalColumn
{
public DfDecimalColumnStored(DataFrame owner, String newName)
{
super(owner, newName);
}
public DfDecimalColumnStored(DataFrame owner, String newName, ListIterable newValues)
{
super(owner, newName, newValues);
}
@Override
public void addObject(Object newObject)
{
this.addMyType((BigDecimal) newObject);
}
@Override
public void addValue(Value value)
{
if (value.isVoid())
{
this.addObject(null);
}
else if (value.isDecimal())
{
this.addMyType(((DecimalValue) value).decimalValue());
}
else
{
this.throwAddingIncompatibleValueException(value);
}
}
}