|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.lightdev.lib.holiday.client.Region
public class Region
Region for events
A region can be used to determine where a particular event is observed.
A special characteristic of a region in the context of the Light Development Holiday Library is that it may be any geographic area such as a continent, a country, a state, a city or county, etc. Regions are modeled hierarchical in the way that each region links to one superior region, e.g. Paris links to France, France links to Europe, Europe links to World.
| Constructor Summary | |
|---|---|
Region()
constructor |
|
Region(int id,
String rName)
construct a region object with a given id and name |
|
| Method Summary | |
|---|---|
int |
compareTo(Object o)
|
boolean |
equals(Object obj)
|
Object |
getData()
|
Object |
getId()
get the id of this region |
String |
getName()
get the name of this region |
Object |
getParentId()
|
int |
getSuperiorId()
get the id of the region superior to this region |
boolean |
isRoot()
|
void |
setData(Object data)
|
void |
setId(int id)
set the unique id of this region |
void |
setId(Object id)
|
void |
setName(String name)
set the name of this region |
void |
setParentId(Object parentId)
|
void |
setSuperiorId(int superiorId)
set the id of the region superior to this region |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Region()
public Region(int id,
String rName)
id - int the id of the regionrName - String the name of the region| Method Detail |
|---|
public String toString()
toString in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic void setId(int id)
id - int the region idpublic Object getId()
getId in interface HierarchicalItempublic void setSuperiorId(int superiorId)
superiorId - int the superior region idpublic int getSuperiorId()
public void setName(String name)
name - String the region name to setpublic String getName()
public void setData(Object data)
setData in interface HierarchicalItempublic Object getData()
getData in interface HierarchicalItempublic void setId(Object id)
setId in interface HierarchicalItempublic Object getParentId()
getParentId in interface HierarchicalItempublic void setParentId(Object parentId)
setParentId in interface HierarchicalItempublic boolean isRoot()
isRoot in interface HierarchicalItempublic int compareTo(Object o)
compareTo in interface Comparable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||