public enum Population extends Enum<Population> implements Comparator<Population>
Parameter
is assigned with a population type, which facilitates ordering and
presentation on the GUI.
Created: August 24, 2008Enum Constant and Description |
---|
EMIGRANTS
The emigrant population.
|
IMMIGRANTS
The immigrant population.
|
NATIVES
The native population.
|
Modifier and Type | Method and Description |
---|---|
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.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
equals
public static final Population NATIVES
public static final Population EMIGRANTS
public static final Population IMMIGRANTS
public static Population[] values()
for (Population c : Population.values()) System.out.println(c);
public static Population valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic int compare(Population p1, Population p2)
compare
in interface Comparator<Population>
public String toString()
toString
in class Enum<Population>
Copyright © 2012. All Rights Reserved.