Class Visit

java.lang.Object
de.dhbw.contactdb.Visit

public class Visit extends Object
Main class
Since:
21.06.2021
Version:
1.0
Author:
florian kaiser
  • Field Details

    • place

      private final Place place
      place where person is
    • start

      private LocalDateTime start
      start date of visit
    • end

      private LocalDateTime end
      end date of visit
    • person

      private Person person
      person who visits
  • Constructor Details

    • Visit

      public Visit(LocalDateTime start, LocalDateTime end, Person person, Place place)
      Constructor
      Parameters:
      start - start date of visit
      end - end date of visit
      person - person who visits
      place - place where person is
  • Method Details

    • getStart

      public LocalDateTime getStart()
      Returns:
      start
    • setStart

      public void setStart(LocalDateTime start)
      Parameters:
      start - start
    • getEnd

      public LocalDateTime getEnd()
      Returns:
      end
    • setEnd

      public void setEnd(LocalDateTime end)
      Parameters:
      end - end
    • getPerson

      public Person getPerson()
      Returns:
      person
    • setPerson

      public void setPerson(Person person)
      Parameters:
      person - person
    • getPlace

      public Place getPlace()
      Returns:
      place
    • isOverlapping

      public boolean isOverlapping(LocalDateTime start, LocalDateTime end)
      Parameters:
      start - Start of timespan
      end - End of timespan
      Returns:
      boolean if timespan between start and end is overlapping timespan between this visits start and end
    • isInTimePeriod

      public boolean isInTimePeriod(LocalDateTime inputTime)
      Parameters:
      inputTime - time
      Returns:
      boolean if time is between this visits start and end
    • toString

      public String toString()
      Overrides:
      toString in class Object