class DateTimePeriod {

    public List<DateTimePeriod> toFiveMinutes() {
        ArrayList<DateTimePeriod> list = new ArrayList<DateTimePeriod>();

        // default "current" five minutes to start datetime
        DateTime currentStart = getStart();
        // calculate "next" five minutes
        DateTime nextStart = currentStart.plusMinutes(5);
        // continue adding until we've reached the end
        while (nextStart.isBefore(getEnd()) || nextStart.isEqual(getEnd())) {
            // its okay to add the current
            list.add(new DateTimeFiveMinutes(currentStart, nextStart));
            // increment both
            currentStart = nextStart;
            nextStart = currentStart.plusMinutes(5);
        }

        return list;
    }

    protected  DateTimePeriod(DateTime start, DateTime end, DateTimeDuration duration, String keyPattern,
            String longNamePattern, String shortNamePattern, String indexNamePattern);

}