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

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

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

WeekDay.getOffset介绍

暂无

代码示例

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

/**
 * {@inheritDoc}
 */
public final String toString() {
  final StringBuilder b = new StringBuilder();
  if (getOffset() != 0) {
    b.append(getOffset());
  }
  b.append(getDay());
  return b.toString();
}

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

/**
 * {@inheritDoc}
 */
public final String toString() {
  final StringBuffer b = new StringBuffer();
  if (getOffset() != 0) {
    b.append(getOffset());
  }
  b.append(getDay());
  return b.toString();
}

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

/**
 * {@inheritDoc}
 */
public final String toString() {
  final StringBuilder b = new StringBuilder();
  if (getOffset() != 0) {
    b.append(getOffset());
  }
  b.append(getDay());
  return b.toString();
}

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

/**
 * {@inheritDoc}
 */
public final String toString() {
  final StringBuilder b = new StringBuilder();
  if (getOffset() != 0) {
    b.append(getOffset());
  }
  b.append(getDay());
  return b.toString();
}

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

/**
 * {@inheritDoc}
 */
public final String toString() {
  final StringBuilder b = new StringBuilder();
  if (getOffset() != 0) {
    b.append(getOffset());
  }
  b.append(getDay());
  return b.toString();
}

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

/**
   * {@inheritDoc}
   */
  public final int hashCode() {
    return new HashCodeBuilder().append(getDay())
      .append(getOffset()).toHashCode();
  }
}

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

/**
   * {@inheritDoc}
   */
  public final int hashCode() {
    return new HashCodeBuilder().append(getDay())
      .append(getOffset()).toHashCode();
  }
}

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

/**
   * {@inheritDoc}
   */
  public final int hashCode() {
    return new HashCodeBuilder().append(getDay())
      .append(getOffset()).toHashCode();
  }
}

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

/**
   * {@inheritDoc}
   */
  public final int hashCode() {
    return new HashCodeBuilder().append(getDay())
      .append(getOffset()).toHashCode();
  }
}

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

/**
   * {@inheritDoc}
   */
  public final int hashCode() {
    return new HashCodeBuilder().append(getDay())
      .append(getOffset()).toHashCode();
  }
}

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

/**
 * {@inheritDoc}
 */
public final boolean equals(final Object arg0) {
  if (arg0 == null) {
    return false;
  }
  if (!(arg0 instanceof WeekDay)) {
    return false;
  }
  final WeekDay wd = (WeekDay) arg0;
  return Objects.equals(wd.getDay(), getDay())
    && wd.getOffset() == getOffset();
}

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

/**
 * {@inheritDoc}
 */
public final boolean equals(final Object arg0) {
  if (arg0 == null) {
    return false;
  }
  if (!(arg0 instanceof WeekDay)) {
    return false;
  }
  final WeekDay wd = (WeekDay) arg0;
  return Objects.equals(wd.getDay(), getDay())
    && wd.getOffset() == getOffset();
}

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

/**
 * {@inheritDoc}
 */
public final boolean equals(final Object arg0) {
  if (arg0 == null) {
    return false;
  }
  if (!(arg0 instanceof WeekDay)) {
    return false;
  }
  final WeekDay wd = (WeekDay) arg0;
  return ObjectUtils.equals(wd.getDay(), getDay())
    && wd.getOffset() == getOffset();
}

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

/**
 * {@inheritDoc}
 */
public final boolean equals(final Object arg0) {
  if (arg0 == null) {
    return false;
  }
  if (!(arg0 instanceof WeekDay)) {
    return false;
  }
  final WeekDay wd = (WeekDay) arg0;
  return ObjectUtils.equals(wd.getDay(), getDay())
    && wd.getOffset() == getOffset();
}

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

/**
 * {@inheritDoc}
 */
public final boolean equals(final Object arg0) {
  if (arg0 == null) {
    return false;
  }
  if (!(arg0 instanceof WeekDay)) {
    return false;
  }
  final WeekDay wd = (WeekDay) arg0;
  return ObjectUtils.equals(wd.getDay(), getDay())
    && wd.getOffset() == getOffset();
}

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

protected void outField(final JsonGenerator jgen,
             final String name,
             final WeekDayList val) throws Throwable {
  if ((val == null) || (val.size() == 0)) {
   return;
  }
  jgen.writeFieldName(name);
  if (val.size() == 1) {
   jgen.writeNumber(val.get(0).getOffset());
   return;
  }
  jgen.writeStartArray();
  for (final WeekDay wd: val) {
   jgen.writeString(wd.getDay().name().toLowerCase());
  }
  jgen.writeEndArray();
 }
}

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

return getOffsetDates(days, weekDay.getOffset());

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

@Override
public DateList transform(DateList dates) {
  if (dayList.isEmpty()) {
    return dates;
  }
  final DateList weekDayDates = Dates.getDateListInstance(dates);
  Function<Date, List<Date>> transformer = null;
  switch (getFrequency()) {
    case WEEKLY: transformer = new WeeklyExpansionFilter(dates.getType()); break;
    case MONTHLY: transformer = new MonthlyExpansionFilter(dates.getType()); break;
    case YEARLY: transformer = new YearlyExpansionFilter(dates.getType()); break;
    case DAILY:
    default: transformer = new LimitFilter();
  }
  for (final Date date : dates) {
    List<Date> transformed = transformer.apply(date);
    // filter by offset
    List<Date> filtered = new ArrayList<>();
    dayList.forEach(day -> filtered.addAll(getOffsetDates(transformed.stream().filter(d ->
      getCalendarInstance(d, true).get(Calendar.DAY_OF_WEEK) == WeekDay.getCalendarDay(day))
      .collect(Collectors.toCollection(() -> Dates.getDateListInstance(weekDayDates))), day.getOffset())));
    weekDayDates.addAll(filtered);
  }
  return weekDayDates;
}

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

@Override
public DateList transform(DateList dates) {
  if (dayList.isEmpty()) {
    return dates;
  }
  final DateList weekDayDates = Dates.getDateListInstance(dates);
  Function<Date, List<Date>> transformer = null;
  switch (getFrequency()) {
    case WEEKLY: transformer = new WeeklyExpansionFilter(dates.getType()); break;
    case MONTHLY: transformer = new MonthlyExpansionFilter(dates.getType()); break;
    case YEARLY: transformer = new YearlyExpansionFilter(dates.getType()); break;
    case DAILY:
    default: transformer = new LimitFilter();
  }
  for (final Date date : dates) {
    List<Date> transformed = transformer.apply(date);
    // filter by offset
    List<Date> filtered = new ArrayList<>();
    dayList.forEach(day -> filtered.addAll(getOffsetDates(transformed.stream().filter(d ->
      getCalendarInstance(d, true).get(Calendar.DAY_OF_WEEK) == WeekDay.getCalendarDay(day))
      .collect(Collectors.toCollection(() -> Dates.getDateListInstance(weekDayDates))), day.getOffset())));
    weekDayDates.addAll(filtered);
  }
  return weekDayDates;
}

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

WeekDay wd = (WeekDay)o;
Collection<String>c = hm.get(wd.getOffset());
if (c == null) {
 c = new ArrayList<>();
 hm.put(wd.getOffset(), c);

相关文章