
net.fortuna.ical4j.extensions.strategy.vjournal.Attendance Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ical4j-extensions Show documentation
Show all versions of ical4j-extensions Show documentation
Support for additional non-standard iCalendar objects
package net.fortuna.ical4j.extensions.strategy.vjournal;
import net.fortuna.ical4j.model.component.Participant;
import net.fortuna.ical4j.model.component.VEvent;
import net.fortuna.ical4j.model.component.VJournal;
import java.time.temporal.Temporal;
import java.util.function.BiFunction;
import static net.fortuna.ical4j.model.DateTimePropertyModifiers.DTEND;
import static net.fortuna.ical4j.model.DateTimePropertyModifiers.DTSTART;
import static net.fortuna.ical4j.model.RelationshipPropertyModifiers.RELATED_COMPONENT;
public class Attendance {
private Participant participant;
private VEvent context;
private Temporal start;
private Temporal end;
public Attendance participant(Participant participant) {
this.participant = participant;
return this;
}
public Attendance context(VEvent context) {
this.context = context;
return this;
}
public Attendance start(Temporal start) {
this.start = start;
return this;
}
public Attendance end(Temporal end) {
this.end = end;
return this;
}
public VJournal apply(VJournal vJournal) {
vJournal.with(DTSTART, start);
vJournal.with(DTEND, end);
vJournal.with(RELATED_COMPONENT, context);
vJournal.with((BiFunction) (c, p) -> {
if (p != null) c.add(p);
return c;
},
participant);
return vJournal;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy