Hi all,
I can't understand why NumberCell extends the typed class AbstractCell<Number>?
Would not be better if the class were built in this way?
Code:
public class NumberCell<T extends Number> extends AbstractCell<T> {
...
With current implementation of NumberCell configuring ColumnConfig like this:
Code:
ColumnConfig<CPP, Long> cpp2 = new ColumnConfig<CPP, Long>(props.cpp2(), 100, constants.fairValue());
cpp2.setCell(new NumberCell(cnfmt));
I get this error: The method setCell(Cell<Long>) in the type ColumnConfig<CPP,Long> is not applicable for the arguments (NumberCell) because the field cpp2 is of type Long.
The other hand with the implementation of the above, I can write something like:
Code:
ColumnConfig<CPP, Long> cpp2 = new ColumnConfig<CPP, Long>(props.cpp2(), 100, constants.fairValue());
cpp2.setCell(new NumberCell<Long>(cnfmt));
Can anyone tell me if I'm doing something wrong?