org.pentaho.platform.api.scheduler2.wrappers.YearlyWrapper类的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(79)

本文整理了Java中org.pentaho.platform.api.scheduler2.wrappers.YearlyWrapper类的一些代码示例,展示了YearlyWrapper类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YearlyWrapper类的具体详情如下:
包路径:org.pentaho.platform.api.scheduler2.wrappers.YearlyWrapper
类名称: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 );
 }
}

相关文章