I have a class Calculation which contains a set of CalculationResult.
The CalculationResult has a property String result. It is a String, but the value can represent a calculated date, boolean, double, ...
So I was thinking of making it so that I can get the result in the right datatype:
public Date getAsDate();
public BigDecimal getAsBigDecimal();
...
But I'm not sure how I can best implement this.
Any pointers are appreciated!