Class Person

java.lang.Object
io.jenetics.jpx.Person
All Implemented Interfaces:
Serializable

public final class Person extends Object implements Serializable
A person or organization.
Since:
1.0
Version:
1.2
See Also:
  • Method Details

    • getName

      public Optional<String> getName()
      Return the name of the person or organization.
      Returns:
      the name of the person or organization
    • getEmail

      public Optional<Email> getEmail()
      Return the email address.
      Returns:
      the email address
    • getLink

      public Optional<Link> getLink()
      Return the link to Web site or other external information about person.
      Returns:
      the link to Web site or other external information about person
    • isEmpty

      public boolean isEmpty()
      Return true if all person properties are null.
      Returns:
      true if all person properties are null
    • nonEmpty

      public boolean nonEmpty()
      Return true if not all person properties are null.
      Returns:
      true if not all person properties are null
      Since:
      1.1
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • of

      public static Person of(String name, Email email, Link link)
      Create a new Person object with the given parameters.
      Parameters:
      name - name of person or organization
      email - the person's email address
      link - link to Web site or other external information about person
      Returns:
      a new Person object with the given parameters
    • of

      public static Person of(String name, Email email)
      Create a new Person object with the given parameters.
      Parameters:
      name - name of person or organization
      email - the person's email address
      Returns:
      a new Person object with the given parameters
    • of

      public static Person of(String name)
      Create a new Person object with the given parameters.
      Parameters:
      name - name of person or organization
      Returns:
      a new Person object with the given parameters
    • of

      public static Person of()
      Create a new empty Person.
      Returns:
      a new empty Person