p3j.pppm.parameters
Enum Population

java.lang.Object
  extended by java.lang.Enum<Population>
      extended by p3j.pppm.parameters.Population
All Implemented Interfaces:
Serializable, Comparable<Population>, Comparator<Population>

public enum Population
extends Enum<Population>
implements Comparator<Population>

Enumeration of the populations that are distinguished. Each Parameter is assigned with a population type, which facilitates ordering and presentation on the GUI. Created: August 24, 2008

Author:
Christina Bohk, Roland Ewald

Enum Constant Summary
EMIGRANTS
          The emigrant population.
IMMIGRANTS
          The immigrant population.
NATIVES
          The native population.
 
Method Summary
 int compare(Population p1, Population p2)
           
 String toString()
           
static Population valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Population[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Enum Constant Detail

NATIVES

public static final Population NATIVES
The native population.


EMIGRANTS

public static final Population EMIGRANTS
The emigrant population.


IMMIGRANTS

public static final Population IMMIGRANTS
The immigrant population.

Method Detail

values

public static Population[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Population c : Population.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Population valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

compare

public int compare(Population p1,
                   Population p2)
Specified by:
compare in interface Comparator<Population>

toString

public String toString()
Overrides:
toString in class Enum<Population>


Copyright © 2012. All Rights Reserved.