Package 

Class Person

  • All Implemented Interfaces:

    
    public final class Person
    
                        

    FakeDataProvider implementation class for functionality not covered by the standard dictionary files.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final LocalDate birthDate(Long age, LocalDate at) Returns a pseudo-random birthDate as LocalDate for the given age value.
      final LocalDate birthDate(Long age) Returns a pseudo-random birthDate as LocalDate for the given age value.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • birthDate

        @JvmOverloads() final LocalDate birthDate(Long age, LocalDate at)

        Returns a pseudo-random birthDate as LocalDate for the given age value.

        If the at date parameter is not provided, then LocalDate.now is used to calculate the "lower bound" for the resulting birthDate. Assuming the age value of 30, the resulting date will be in the range of:

        val start = LocalDate.now().minusYears(30)
        val end = LocalDate.now().minusYears(29).minusDays(1)
        Parameters:
        age - the person's age for which the birthDate will be calculated
        at - a date at which the person was of the specified age.
      • birthDate

        @JvmOverloads() final LocalDate birthDate(Long age)

        Returns a pseudo-random birthDate as LocalDate for the given age value.

        If the at date parameter is not provided, then LocalDate.now is used to calculate the "lower bound" for the resulting birthDate. Assuming the age value of 30, the resulting date will be in the range of:

        val start = LocalDate.now().minusYears(30)
        val end = LocalDate.now().minusYears(29).minusDays(1)
        Parameters:
        age - the person's age for which the birthDate will be calculated