Class 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()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Period

        public Period​(java.time.LocalDate start,
                      java.time.LocalDate end)
    • 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()