
com.mindoo.domino.jna.NotesDateRange Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of domino-jna Show documentation
Show all versions of domino-jna Show documentation
Java project to access the HCL Domino C API using Java Native Access (JNA)
package com.mindoo.domino.jna;
import java.util.Calendar;
import java.util.Date;
/**
* A {@link NotesDateRange} represents a range of dates and times.
*
* @author Karsten Lehmann
*/
public class NotesDateRange {
private NotesTimeDate m_startDateTime;
private NotesTimeDate m_endDateTime;
/**
* Creates a new date range
*
* @param startDateTime start date time, not null
* @param endDateTime end date time, not null
*/
public NotesDateRange(Calendar startDateTime, Calendar endDateTime) {
if (startDateTime==null)
throw new NullPointerException("startDateTime cannot be null");
if (endDateTime==null)
throw new NullPointerException("endDateTime cannot be null");
m_startDateTime = new NotesTimeDate(startDateTime);
m_endDateTime = new NotesTimeDate(endDateTime);
}
/**
* Creates a new date range
*
* @param startDateTime start date time, not null
* @param endDateTime end date time, not null
*/
public NotesDateRange(Date startDateTime, Date endDateTime) {
if (startDateTime==null)
throw new NullPointerException("startDateTime cannot be null");
if (endDateTime==null)
throw new NullPointerException("endDateTime cannot be null");
m_startDateTime = new NotesTimeDate(startDateTime);
m_endDateTime = new NotesTimeDate(endDateTime);
}
/**
* Creates a new date range
*
* @param startDateTime start date time, not null
* @param endDateTime end date time, not null
*/
public NotesDateRange(NotesTimeDate startDateTime, NotesTimeDate endDateTime) {
if (startDateTime==null)
throw new NullPointerException("startDateTime cannot be null");
if (endDateTime==null)
throw new NullPointerException("endDateTime cannot be null");
m_startDateTime = startDateTime;
m_endDateTime = endDateTime;
}
public NotesTimeDate getStartDateTime() {
return m_startDateTime;
}
public NotesTimeDate getEndDateTime() {
return m_endDateTime;
}
@Override
public String toString() {
return "NotesDateRange [start="+m_startDateTime+", end="+m_endDateTime+"]";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy