net.fortuna.ical4j.model.WeekDay.equals()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(110)

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

WeekDay.equals介绍

暂无

代码示例

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

/**
 * Applies BYDAY rules specified in this Recur instance to the specified date list. If no BYDAY rules are specified
 * the date list is returned unmodified.
 * @param dates
 * @return
 */
private DateList getDayVariants(final DateList dates) {
  if (getDayList().isEmpty()) {
    return dates;
  }
  final DateList weekDayDates = getDateListInstance(dates);
  for (final Iterator i = dates.iterator(); i.hasNext();) {
    final Date date = (Date) i.next();
    for (final Iterator j = getDayList().iterator(); j.hasNext();) {
      final WeekDay weekDay = (WeekDay) j.next();
      // if BYYEARDAY or BYMONTHDAY is specified filter existing
      // list..
      if (!getYearDayList().isEmpty() || !getMonthDayList().isEmpty()) {
        final Calendar cal = getCalendarInstance(date, true);
        if (weekDay.equals(WeekDay.getWeekDay(cal))) {
          weekDayDates.add(date);
        }
      }
      else {
        weekDayDates.addAll(getAbsWeekDays(date, dates.getType(), weekDay));
      }
    }
  }
  return weekDayDates;
}

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

/**
 * Applies BYDAY rules specified in this Recur instance to the specified date list. If no BYDAY rules are specified
 * the date list is returned unmodified.
 *
 * @param dates
 * @return
 */
private DateList getDayVariants(final DateList dates) {
  if (getDayList().isEmpty()) {
    return dates;
  }
  final DateList weekDayDates = getDateListInstance(dates);
  for (final Date date : dates) {
    for (final WeekDay weekDay : getDayList()) {
      // if BYYEARDAY or BYMONTHDAY is specified filter existing
      // list..
      if (!getYearDayList().isEmpty() || !getMonthDayList().isEmpty()) {
        final Calendar cal = getCalendarInstance(date, true);
        if (weekDay.equals(WeekDay.getWeekDay(cal))) {
          weekDayDates.add(date);
        }
      } else {
        weekDayDates.addAll(getAbsWeekDays(date, dates.getType(), weekDay));
      }
    }
  }
  return weekDayDates;
}

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

/**
 * Applies BYDAY rules specified in this Recur instance to the specified date list. If no BYDAY rules are specified
 * the date list is returned unmodified.
 *
 * @param dates
 * @return
 */
private DateList getDayVariants(final DateList dates) {
  if (getDayList().isEmpty()) {
    return dates;
  }
  final DateList weekDayDates = getDateListInstance(dates);
  for (final Date date : dates) {
    for (final WeekDay weekDay : getDayList()) {
      // if BYYEARDAY or BYMONTHDAY is specified filter existing
      // list..
      if (!getYearDayList().isEmpty() || !getMonthDayList().isEmpty()) {
        final Calendar cal = getCalendarInstance(date, true);
        if (weekDay.equals(WeekDay.getWeekDay(cal))) {
          weekDayDates.add(date);
        }
      } else {
        weekDayDates.addAll(getAbsWeekDays(date, dates.getType(), weekDay));
      }
    }
  }
  return weekDayDates;
}

相关文章