uk.org.redfelineninja.risk.data
Class Continent

java.lang.Object
  |
  +--uk.org.redfelineninja.risk.data.Continent

public class Continent
extends java.lang.Object

Data type representing a Continent.


Field Summary
 java.lang.String name
           
 int value
           
 
Constructor Summary
Continent(java.lang.String n, int v)
          Create a new continent.
 
Method Summary
 boolean addCountry(java.lang.String c)
          Add a country to this continent.
 java.util.Enumeration countries()
          Provides a list of the countries contained within this continent.
 boolean equals(java.lang.Object obj)
          Compare two continents for equality.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public final java.lang.String name

value

public final int value
Constructor Detail

Continent

public Continent(java.lang.String n,
                 int v)
Create a new continent.

No two different continents should have the same name, see the equals method.

Method Detail

equals

public boolean equals(java.lang.Object obj)
Compare two continents for equality. This method makes the assumption that continents are uniquely identified by their name. Bearing this in mind remember that this method may give incorrect matches it a continent does not have a unique name.

Overrides:
equals in class java.lang.Object

addCountry

public boolean addCountry(java.lang.String c)
Add a country to this continent.


countries

public java.util.Enumeration countries()
Provides a list of the countries contained within this continent.