java.lang.Comparable
public class Age
extends java.lang.Object
implements java.lang.Comparable
Voice
Modifier and Type | Field | Description |
---|---|---|
static Age |
CHILD |
Age roughly up to 12 years.
|
static Age |
DONT_CARE |
Matches against any Age.
|
static Age |
MIDDLE_ADULT |
Age roughly 40 to 60 years.
|
static Age |
NEUTRAL |
An Age that is indeterminate.
|
static Age |
OLDER_ADULT |
Age roughly 60 years and up.
|
static Age |
TEENAGER |
Age roughly 13 to 19 years.
|
static Age |
YOUNGER_ADULT |
Age roughly 20 to 40 years.
|
Modifier and Type | Method | Description |
---|---|---|
int |
compareTo(java.lang.Object o) |
Compare two ages.
|
java.lang.String |
toString() |
Provide a human readable string that describes the age.
|
public static final Age CHILD
public static final Age TEENAGER
public static final Age YOUNGER_ADULT
public static final Age MIDDLE_ADULT
public static final Age OLDER_ADULT
public static final Age NEUTRAL
public static final Age DONT_CARE
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable