All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.fortuna.ical4j.extensions.strategy.event.Appointment Maven / Gradle / Ivy

The newest version!
package net.fortuna.ical4j.extensions.strategy.event;

import net.fortuna.ical4j.extensions.strategy.AbstractStrategy;
import net.fortuna.ical4j.model.component.VEvent;

import java.time.ZonedDateTime;

import static net.fortuna.ical4j.model.DateTimePropertyModifiers.DTSTART;

public class Appointment extends AbstractStrategy {

    private ZonedDateTime start;

    public Appointment start(ZonedDateTime start) {
        this.start = start;
        return this;
    }

    @Override
    public VEvent get() {
        VEvent vEvent = getPrototype().isPresent() ? getPrototype().get().copy() : new VEvent();
        vEvent.with(DTSTART, start);
        return vEvent;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy