public static IsoRecurrence<MomentInterval> of(
        int count,
        Moment start,
        Moment end,
        ZonalOffset offset
    ) {

        check(count);

        if (!end.isAfter(start)) {
            throw new IllegalArgumentException("End is not after start.");
        }

        PlainTimestamp s = start.toZonalTimestamp(offset);
        PlainTimestamp e = end.toZonalTimestamp(offset);

        return new RecurrentMomentIntervals(
            count,
            TYPE_START_END,
            s,
            offset,
            Duration.in(YEARS, MONTHS, DAYS, HOURS, MINUTES, SECONDS, NANOS).between(s, e));

    }
public static IsoRecurrence < MomentInterval > of ( int count , Moment start , Moment end , ZonalOffset offset ) { check ( count ) ; if ( ! end . isAfter ( start ) ) { throw new IllegalArgumentException ( "End is not after start." ) ; } PlainTimestamp s = start . toZonalTimestamp ( offset ) ; PlainTimestamp e = end . toZonalTimestamp ( offset ) ; return new RecurrentMomentIntervals ( count , TYPE_START_END , s , offset , Duration . in ( YEARS , MONTHS , DAYS , HOURS , MINUTES , SECONDS , NANOS ) . between ( s , e ) ) ; }
/*[deutsch]
<p>Erzeugt eine Sequenz von wiederkehrenden Moment-Intervallen mit der Dauer des ersten Intervalls
in Jahren, Monaten, Tagen, Stunden, Minuten, Sekunden und Nanosekunden. </p>

@param   count       the count of repeating intervals ({@code >= 0})
@param   start       denotes the start of first interval (inclusive)
@param   end         denotes the end of first interval (exclusive)
@param   offset      time zone offset in full minutes
@return  sequence of recurrent half-open moment intervals
@throws  IllegalArgumentException if the count is negative or if start is not before end