How about if a ReadableIntervalable ;-) interface was created?
public class MyInterval extends BaseInterval implements ReadableIntervalable
{
public MyInterval (ReadableInstant start, ReadableInstant end) {
super(start, end);
}
public ReadableInterval asReadableInterval() {
return this;
}
}
It would make integration into client code simpler and less invasive.
I guess similar for Instants and some thought as to what is really req'd ie
read/write/Instant etc
Now I can do this:
public float calculateDuration(List<? extends ReadableIntervalable>
intervals) {
for (ReadableIntervalable interval : intervals) {
millis += interval.asReadableInterval().toDurationMillis();
}
return getDuration();
}
--
Mike W
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Joda-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/joda-interest