Methods like Intervals.expand should wrap the arrays they internally create (using FinalInterval.wrap) instead of copying them into a new FinalInterval.
Also It would be good if these methods would just return Interval instead of FinalInterval. But probably we cannot change that without breaking stuff. A possible way forward is deprecating Intervals and adding equivalent static methods to the Interval interface.
Methods like
Intervals.expandshould wrap the arrays they internally create (usingFinalInterval.wrap) instead of copying them into a newFinalInterval.Also It would be good if these methods would just return
Intervalinstead ofFinalInterval. But probably we cannot change that without breaking stuff. A possible way forward is deprecatingIntervalsand adding equivalent static methods to theIntervalinterface.