当前位置: 首页>>代码示例>>Java>>正文


Java VAlarm.setRepeat方法代码示例

本文整理汇总了Java中biweekly.component.VAlarm.setRepeat方法的典型用法代码示例。如果您正苦于以下问题:Java VAlarm.setRepeat方法的具体用法?Java VAlarm.setRepeat怎么用?Java VAlarm.setRepeat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在biweekly.component.VAlarm的用法示例。


在下文中一共展示了VAlarm.setRepeat方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: checkForDataModelConversions_repeat

import biweekly.component.VAlarm; //导入方法依赖的package包/类
@Test
public void checkForDataModelConversions_repeat() {
	Action action = Action.audio();
	int repeat = 2;

	VAlarm alarm = new VAlarm(action, null);
	alarm.setRepeat(repeat);
	try {
		scribe.checkForDataModelConversions(alarm, null, V1_0);
	} catch (DataModelConversionException e) {
		AudioAlarm expected = new AudioAlarm();
		expected.setRepeat(repeat);
		assertNull(e.getOriginalProperty());
		assertEquals(Arrays.asList(expected), e.getProperties());
		assertEquals(Arrays.asList(), e.getComponents());
	}
}
 
开发者ID:mangstadt,项目名称:biweekly,代码行数:18,代码来源:VAlarmScribeTest.java

示例2: toVAlarm

import biweekly.component.VAlarm; //导入方法依赖的package包/类
/**
 * Converts an instance of a vCal alarm property into a {@link VAlarm}
 * component.
 * @param property the property to convert
 * @return the component
 */
protected VAlarm toVAlarm(T property) {
	Trigger trigger = new Trigger(property.getStart());
	VAlarm valarm = new VAlarm(action(), trigger);
	valarm.setDuration(property.getSnooze());
	valarm.setRepeat(property.getRepeat());

	toVAlarm(valarm, property);
	return valarm;
}
 
开发者ID:mangstadt,项目名称:biweekly,代码行数:16,代码来源:VCalAlarmPropertyScribe.java

示例3: example4

import biweekly.component.VAlarm; //导入方法依赖的package包/类
@Test
public void example4() throws Throwable {
	ICalendar ical = new ICalendar();
	ical.getProperties().clear();
	ical.setProductId("-//ABC Corporation//NONSGML My Product//EN");
	{
		VTodo todo = new VTodo();
		todo.getProperties().clear();
		todo.setDateTimeStamp(utc("1998-01-30 13:45:00"));
		todo.setSequence(2);
		todo.setUid("[email protected]");
		todo.setOrganizer("[email protected]");

		Attendee attendee = new Attendee(null, "[email protected]");
		attendee.setParticipationStatus(ParticipationStatus.ACCEPTED);
		todo.addAttendee(attendee);

		todo.setDateDue(date("1998-04-15"));
		todo.setStatus(Status.needsAction());
		todo.setSummary("Submit Income Taxes");
		{
			Trigger trigger = new Trigger(utc("1998-04-03 12:00:00"));
			Attachment attach = new Attachment("audio/basic", "http://example.com/pub/audio-files/ssbanner.aud");
			VAlarm alarm = VAlarm.audio(trigger, attach);
			alarm.setRepeat(4);
			alarm.setDuration(Duration.builder().hours(1).build());
			todo.addAlarm(alarm);
		}

		ical.addTodo(todo);
	}

	assertValidate(ical).versions(V2_0_DEPRECATED, V2_0).run();
	TimezoneInfo tzinfo = ical.getTimezoneInfo();
	tzinfo.setFloating(ical.getTodos().get(0).getDateDue(), true);
	assertExample(ical, "rfc5545-example4.ics", V2_0);
}
 
开发者ID:mangstadt,项目名称:biweekly,代码行数:38,代码来源:ICalWriterTest.java


注:本文中的biweekly.component.VAlarm.setRepeat方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。