net.fortuna.ical4j.model.property.Duration.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(6.9k)|赞(0)|评价(0)|浏览(90)

本文整理了Java中net.fortuna.ical4j.model.property.Duration.<init>()方法的一些代码示例,展示了Duration.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Duration.<init>()方法的具体详情如下:
包路径:net.fortuna.ical4j.model.property.Duration
类名称:Duration
方法名:<init>

Duration.<init>介绍

[英]Default constructor.
[中]默认构造函数。

代码示例

代码示例来源:origin: org.bedework/bw-ical4j-cl

public Property createProperty(final String name,
    final ParameterList parameters, final String value)
    throws IOException, URISyntaxException, ParseException {
  return new Duration(parameters, value);
}

代码示例来源:origin: ical4j/ical4j

public Property createProperty() {
    return new Duration();
  }
}

代码示例来源:origin: org.mnode.ical4j/ical4j

public Property createProperty(final ParameterList parameters, final String value)
    throws IOException, URISyntaxException, ParseException {
  return new Duration(parameters, value);
}

代码示例来源:origin: org.bedework.ical4j/ical4j

public Property createProperty(final ParameterList parameters, final String value)
    throws IOException, URISyntaxException, ParseException {
  return new Duration(parameters, value);
}

代码示例来源:origin: ical4j/ical4j

public Property createProperty(final ParameterList parameters, final String value)
    throws IOException, URISyntaxException, ParseException {
  return new Duration(parameters, value);
}

代码示例来源:origin: net.oneandone.ical4j/ical4j

public Property createProperty() {
    return new Duration();
  }
}

代码示例来源:origin: PrivacyApps/calendar-import-export

private static Duration createDuration(String value) {
  Duration d = new Duration();
  d.setValue(value);
  return d;
}

代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-facade

/** Make an ical Duration
 *
 * @return Duration
 */
public Duration makeDuration() {
 Dur d;
 if (weeks != 0) {
  d = new Dur(getWeeks());
 } else {
  d = new Dur(getDays(), getHours(), getMinutes(), getSeconds());
 }
 return new Duration(d);
}

代码示例来源:origin: apache/ofbiz-framework

protected static Duration toDuration(Double javaObj) {
  if (javaObj == null) {
    return null;
  }
  TimeDuration duration = TimeDuration.fromNumber(javaObj);
  return new Duration(new Dur(duration.days(), duration.hours(), duration.minutes(), duration.seconds()));
}

代码示例来源:origin: ical4j/ical4j

/**
 * Constructs a new VEVENT instance starting at the specified times, for the specified duration, with the specified
 * summary.
 * @param start the start date of the new event
 * @param duration the duration of the new event
 * @param summary the event summary
 */
public VEvent(final Date start, final TemporalAmount duration, final String summary) {
  this();
  getProperties().add(new DtStart(start));
  getProperties().add(new Duration(duration));
  getProperties().add(new Summary(summary));
}

代码示例来源:origin: org.mnode.ical4j/ical4j

/**
 * Constructs a new VEVENT instance starting at the specified times, for the specified duration, with the specified
 * summary.
 * @param start the start date of the new event
 * @param duration the duration of the new event
 * @param summary the event summary
 */
public VEvent(final Date start, final TemporalAmount duration, final String summary) {
  this();
  getProperties().add(new DtStart(start));
  getProperties().add(new Duration(duration));
  getProperties().add(new Summary(summary));
}

代码示例来源:origin: org.bedework.ical4j/ical4j

/**
 * Constructs a new VTODO instance starting at the specified times, for the specified duration, with the specified
 * summary.
 * @param start the start date of the new todo
 * @param duration the duration of the new todo
 * @param summary the todo summary
 */
public VToDo(final Date start, final Dur duration, final String summary) {
  this();
  getProperties().add(new DtStart(start));
  getProperties().add(new Duration(duration));
  getProperties().add(new Summary(summary));
}

代码示例来源:origin: org.bedework/bw-ical4j-cl

/**
 * Constructs a new VTODO instance starting at the specified times, for the specified duration, with the specified
 * summary.
 * @param start the start date of the new todo
 * @param duration the duration of the new todo
 * @param summary the todo summary
 */
public VToDo(final Date start, final Dur duration, final String summary) {
  this();
  getProperties().add(new DtStart(start));
  getProperties().add(new Duration(duration));
  getProperties().add(new Summary(summary));
}

代码示例来源:origin: net.oneandone.ical4j/ical4j

/**
 * Constructs a new VTODO instance starting at the specified times, for the specified duration, with the specified
 * summary.
 * @param start the start date of the new todo
 * @param duration the duration of the new todo
 * @param summary the todo summary
 */
public VToDo(final Date start, final Dur duration, final String summary) {
  this();
  getProperties().add(new DtStart(start));
  getProperties().add(new Duration(duration));
  getProperties().add(new Summary(summary));
}

代码示例来源:origin: org.bedework.ical4j/ical4j

/**
 * Constructs a new VPOLL instance starting at the specified times, for the specified duration, with the specified
 * summary.
 * @param start the start date of the new poll
 * @param duration the duration of the new poll
 * @param summary the poll summary
 */
public VPoll(final Date start, final Dur duration, final String summary) {
  this();
  getProperties().add(new DtStart(start));
  getProperties().add(new Duration(duration));
  getProperties().add(new Summary(summary));
}

代码示例来源:origin: org.bedework/bw-ical4j-cl

/**
 * Constructs a new VEVENT instance starting at the specified times, for the specified duration, with the specified
 * summary.
 * @param start the start date of the new event
 * @param duration the duration of the new event
 * @param summary the event summary
 */
public VEvent(final Date start, final Dur duration, final String summary) {
  this();
  getProperties().add(new DtStart(start));
  getProperties().add(new Duration(duration));
  getProperties().add(new Summary(summary));
}

代码示例来源:origin: ical4j/ical4j

/**
 * Constructs a new VTODO instance starting at the specified times, for the specified duration, with the specified
 * summary.
 * @param start the start date of the new todo
 * @param duration the duration of the new todo
 * @param summary the todo summary
 */
public VToDo(final Date start, final TemporalAmount duration, final String summary) {
  this();
  getProperties().add(new DtStart(start));
  getProperties().add(new Duration(duration));
  getProperties().add(new Summary(summary));
}

代码示例来源:origin: net.oneandone.ical4j/ical4j

/**
 * Constructs a new VEVENT instance starting at the specified times, for the specified duration, with the specified
 * summary.
 * @param start the start date of the new event
 * @param duration the duration of the new event
 * @param summary the event summary
 */
public VEvent(final Date start, final Dur duration, final String summary) {
  this();
  getProperties().add(new DtStart(start));
  getProperties().add(new Duration(duration));
  getProperties().add(new Summary(summary));
}

代码示例来源:origin: org.bedework.ical4j/ical4j

/**
 * Constructs a new VEVENT instance starting at the specified times, for the specified duration, with the specified
 * summary.
 * @param start the start date of the new event
 * @param duration the duration of the new event
 * @param summary the event summary
 */
public VEvent(final Date start, final Dur duration, final String summary) {
  this();
  getProperties().add(new DtStart(start));
  getProperties().add(new Duration(duration));
  getProperties().add(new Summary(summary));
}

代码示例来源:origin: ical4j/ical4j

/**
 * @return
 * @throws ParseException
 */
public static TestSuite suite() {
  TestSuite suite = new TestSuite();
  Duration duration = new Duration(java.time.Period.ofWeeks(1));
  suite.addTest(new DurationTest(duration, "P1W"));
  suite.addTest(new DurationTest("testValidation", duration));
  suite.addTest(new DurationTest("testEquals", duration));
  return suite;
}

相关文章

微信公众号

最新文章

更多