本文整理了Java中org.pentaho.platform.api.scheduler2.wrappers.YearlyWrapper
类的一些代码示例,展示了YearlyWrapper
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YearlyWrapper
类的具体详情如下:
包路径:org.pentaho.platform.api.scheduler2.wrappers.YearlyWrapper
类名称:YearlyWrapper
暂无
代码示例来源:origin: pentaho/pentaho-platform
/**
* Overrides any previously applied yearly recurrences with the provided recurrence.
*
* @param recurrence
* the yearly recurrence. If null it will recur every year.
*/
public void setYearlyRecurrence( ITimeRecurrence recurrence ) {
yearlyRecurrences.clear();
if ( recurrence != null ) {
yearlyRecurrences.add( recurrence );
}
}
代码示例来源:origin: pentaho/pentaho-platform
Assert.assertEquals( trigger.getYearlyRecurrences().size(), 1 );
Assert.assertTrue( trigger.getYearlyRecurrences().get( 0 ) instanceof RecurrenceList );
Assert.assertEquals( ( (RecurrenceList) trigger.getYearlyRecurrences().get( 0 ) ).getValues().size(), 1 );
Assert.assertEquals( ( (RecurrenceList) trigger.getYearlyRecurrences().get( 0 ) ).getValues().get( 0 ),
new Integer( 2010 ) );
Assert.assertEquals( trigger.getYearlyRecurrences().size(), 0 );
Assert.assertEquals( trigger.getMonthlyRecurrences().size(), 0 );
Assert.assertEquals( trigger.getDayOfMonthRecurrences().size(), 0 );
Assert.assertEquals( trigger.getYearlyRecurrences().size(), 0 );
Assert.assertEquals( trigger.getMonthlyRecurrences().size(), 0 );
Assert.assertEquals( trigger.getDayOfMonthRecurrences().size(), 0 );
Assert.assertEquals( trigger.getYearlyRecurrences().size(), 1 );
Assert.assertTrue( trigger.getYearlyRecurrences().get( 0 ) instanceof RecurrenceList );
Assert.assertEquals( ( (RecurrenceList) trigger.getYearlyRecurrences().get( 0 ) ).getValues().size(), 2 );
Assert.assertEquals( ( (RecurrenceList) trigger.getYearlyRecurrences().get( 0 ) ).getValues().get( 0 ),
new Integer( 2010 ) );
Assert.assertEquals( ( (RecurrenceList) trigger.getYearlyRecurrences().get( 0 ) ).getValues().get( 1 ),
new Integer( 2013 ) );
Assert.assertEquals( trigger.getYearlyRecurrences().size(), 1 );
Assert.assertTrue( trigger.getYearlyRecurrences().get( 0 ) instanceof SequentialRecurrence );
Assert.assertEquals( ( (SequentialRecurrence) trigger.getYearlyRecurrences().get( 0 ) ).getFirstValue(),
new Integer( 2010 ) );
Assert.assertEquals( ( (SequentialRecurrence) trigger.getYearlyRecurrences().get( 0 ) ).getLastValue(),
new Integer( 2013 ) );
代码示例来源:origin: pentaho/pentaho-platform
/**
* Add a recurrence to the yearly recurrences.
*
* @param recurrence
* the yearly recurrence. If null no addition occurs.
*/
public void addYearlyRecurrence( ITimeRecurrence recurrence ) {
if ( recurrence != null ) {
yearlyRecurrences.add( recurrence );
}
}
内容来源于网络,如有侵权,请联系作者删除!