Class Family

java.lang.Object
   |
   +----Family

public class Family
extends Object
This class holds information about a family, with references to husband, wife and children, and marriage data.

Author:
Vegard Brox

Constructor Index

 o Family(String, YearRange, String, String, Vector)
Constructor that initialises the class with specified values

Method Index

 o getChildren()
Returns the children
 o getHusband()
Returns the husband
 o getID()
Returns the family ID
 o getMarriage()
Returns the marriage date
 o getWife()
Returns the wife
 o toString()
Returns a string representation of this object.

Constructors

 o Family
 public Family(String id,
               YearRange marriage,
               String husband,
               String wife,
               Vector children)
Constructor that initialises the class with specified values

Parameters:
id - The family ID
marriage - A year range representing the marriage date
husband - The ID of the husband in the family
wife - The ID of the wife in the family
children - A vector of strings with IDs of the children

Methods

 o getID
 public String getID()
Returns the family ID

Returns:
The family ID
 o getMarriage
 public YearRange getMarriage()
Returns the marriage date

Returns:
A year range representing the marriage date
 o getHusband
 public String getHusband()
Returns the husband

Returns:
A string with the ID of the husband
 o getWife
 public String getWife()
Returns the wife

Returns:
A string with the ID of the wife
 o getChildren
 public Enumeration getChildren()
Returns the children

Returns:
An enumeration of strings with IDs of the children
 o toString
 public String toString()
Returns a string representation of this object.

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