Package org.mitre.synthea.identity
Class Period
- java.lang.Object
-
- org.mitre.synthea.identity.Period
-
public class Period extends java.lang.Object
A simple representation of a time period with a start and end date. End date may be null for usage with Seeds to represent an open-ended range, if it is the last Seed for an Entity.
-
-
Constructor Summary
Constructors Constructor Description Period(java.time.LocalDate start, java.time.LocalDate end)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(long timestamp)
Determines whether the timestamp is within this period.boolean
contains(java.time.LocalDate date)
java.time.LocalDate
getEnd()
java.time.LocalDate
getStart()
-
-
-
Method Detail
-
contains
public boolean contains(java.time.LocalDate date)
-
contains
public boolean contains(long timestamp)
Determines whether the timestamp is within this period.- Parameters:
timestamp
- to check- Returns:
- true if it is a part of this period inclusive of start and end
-
getStart
public java.time.LocalDate getStart()
-
getEnd
public java.time.LocalDate getEnd()
-
-