public CalendarPeriod GetCalendarPeriod ( ) { CalendarPeriod res = new CalendarPeriod ( ) ; List < Period > periods = new ArrayList < Period > ( ) ; for ( int i = 0 ; i < this . periods . size ( ) ; i ++ ) { PeriodAssociative < T > p = this . periods . get ( i ) ; periods . add ( new Period ( p . getFrom ( ) , p . getTo ( ) ) ) ; } // use merge to merge jointed periods... res . setPeriods ( res . _Merge ( periods ) ) ; return res ; }
returns the same but with no values and with the periods merged