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

net.fortuna.ical4j.extensions.strategy.vjournal.Note Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
package net.fortuna.ical4j.extensions.strategy.vjournal;

import net.fortuna.ical4j.model.component.VJournal;
import net.fortuna.ical4j.model.component.VLocation;

import java.time.LocalDate;

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

/**
 * A Note is an independent journal item that may or may not refer to one or more other
 * referencable items. A Note may be location-specific in addition to temporal.
 */
public class Note {

    private String title;

    private LocalDate date;

    private VLocation location;

    public Note title(String title) {
        this.title = title;
        return this;
    }

    public Note date(LocalDate date) {
        this.date = date;
        return this;
    }

    public Note location(VLocation location) {
        this.location = location;
        return this;
    }

    public VJournal apply(VJournal vJournal) {
        vJournal.with(SUMMARY, title);
        vJournal.with(DTSTART, date);
        vJournal.add(location);
        return vJournal;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy