ca.site.elkb
Class Group

java.lang.Object
  extended by ca.site.elkb.Group

public class Group
extends java.lang.Object

Represents a Roget's Thesaurus Head group. For example:

A Group can contain 1,2 or 3 HeadInfo objects.

Version:
1.4 2013
Author:
Mario Jarmasz and Alistsair Kennedy

Constructor Summary
Group()
          Default constructor.
Group(int start)
          Constructor that takes an integer to indicate first Head number of the Group.
 
Method Summary
 void addHead(HeadInfo head)
          Add a HeadInfo object to this Group.
 int getHeadCount()
          Returns the number of Heads in this Group.
 java.util.ArrayList<HeadInfo> getHeadList()
          Returns the array of HeadInfo objects.
 int getHeadStart()
          Returns the number of the first Head in this Group.
 void setHeadStart(int start)
          Sets the number of the first Head in this Group.
 java.lang.String toString()
          Converts to a string representation the Group object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Group

public Group()
Default constructor.


Group

public Group(int start)
Constructor that takes an integer to indicate first Head number of the Group.

Parameters:
start -
Method Detail

getHeadList

public java.util.ArrayList<HeadInfo> getHeadList()
Returns the array of HeadInfo objects.

Returns:
ArrayList of heads

addHead

public void addHead(HeadInfo head)
Add a HeadInfo object to this Group.

Parameters:
head -

getHeadCount

public int getHeadCount()
Returns the number of Heads in this Group.

Returns:
head count

setHeadStart

public void setHeadStart(int start)
Sets the number of the first Head in this Group.

Parameters:
start -

getHeadStart

public int getHeadStart()
Returns the number of the first Head in this Group.

Returns:
first head number

toString

public java.lang.String toString()
Converts to a string representation the Group object.

Overrides:
toString in class java.lang.Object