I\'m trying do define an interface in which I want to plot some values received by an external device. These values are received with a frequency that can be set through the
I think because you have this:
public class MultipleOfMilliseconds extends Millisecond
// ^^^^^^^^^^^
this is true
:
if(timeSample instanceof Millisecond)
If you change the ordering of the tests you might have better luck:
if(timeSample instanceof MultipleOfMillisecond)
this.pointsInTime = new MultipleOfMillisecond[nMoments];
else if (timeSample instanceof Millisecond)
this.pointsInTime = new Millisecond[nMoments];