Class Person

java.lang.Object
   |
   +----Person

public class Person
extends Object
This class holds information about an individual person.

Author:
Vegard Brox

Variable Index

 o FEMALE
A constant value representing females
 o MALE
A constant value representing males

Constructor Index

 o Person(String, YearRange, YearRange, YearRange, YearRange, int, String, Vector)
Constructor that initialise an object with the specified values.

Method Index

 o getBirth()
Returns the birth date of the person
 o getBurial()
Returns the burial date of the person
 o getCFamily()
Returns the ID of the family where this person is a child
 o getChristening()
Returns the christening date of the person
 o getDeath()
Returns the death date of the person
 o getID()
Returns the ID of the person
 o getSFamilies()
Returns IDs of families where this person is a spouse
 o isFemale()
Returns if the person is a female
 o isMale()
Returns if the person is a male
 o toString()
Returns a string representation of this object.

Variables

 o MALE
 public static final int MALE
A constant value representing males

 o FEMALE
 public static final int FEMALE
A constant value representing females

Constructors

 o Person
 public Person(String id,
               YearRange birth,
               YearRange death,
               YearRange christening,
               YearRange burial,
               int sex,
               String cFamily,
               Vector sFamilies)
Constructor that initialise an object with the specified values.

Parameters:
id - ID of the person
birth - A year range for the birth date of the person
death - A year range for the death date of the person
christening - A year range for the christening date of the person
burial - A year range for the burial date of the person
sex - The sex of the person - either MALE or FEMALE
cFamily - The ID of the family where this person is a child
sFamilies - A vector of IDs of families where this person is a spouse

Methods

 o getID
 public String getID()
Returns the ID of the person

Returns:
The ID as a string
 o getBirth
 public YearRange getBirth()
Returns the birth date of the person

Returns:
A year range for the birth date of the person
 o getDeath
 public YearRange getDeath()
Returns the death date of the person

Returns:
A year range for the death date of the person
 o getChristening
 public YearRange getChristening()
Returns the christening date of the person

Returns:
A year range for the christening date of the person
 o getBurial
 public YearRange getBurial()
Returns the burial date of the person

Returns:
A year range for the burial date of the person
 o isMale
 public boolean isMale()
Returns if the person is a male

Returns:
True if the person is male, false otherwise
 o isFemale
 public boolean isFemale()
Returns if the person is a female

Returns:
True if the person is female, false otherwise
 o getCFamily
 public String getCFamily()
Returns the ID of the family where this person is a child

Returns:
The ID of the family where this person is a child
 o getSFamilies
 public Enumeration getSFamilies()
Returns IDs of families where this person is a spouse

Returns:
An enumeration containing IDs of families where this person is a spouse
 o toString
 public String toString()
Returns a string representation of this object.

Returns:
The ID of this person, which is a string representation of the object
Overrides:
toString in class Object