Object Age.Companion
-
- All Implemented Interfaces:
public class Age.Companion
Constants and factories.
-
-
Field Summary
Fields Modifier and Type Field Description public final static Integer
CHILD_THRESHOLD
public final static Integer
ADULT_THRESHOLD
public final static Age.Companion
INSTANCE
-
Method Summary
Modifier and Type Method Description final Age
fromYears(Integer age)
Returns the corresponding age in this enum given the age in years. final Age
fromString(String age)
Returns the corresponding age in this enum given a string resembling it. final Age
fromAny(Object age)
Returns the corresponding age in this enum given a string resembling it. -
-
Method Detail
-
fromYears
final Age fromYears(Integer age)
Returns the corresponding age in this enum given the age in years.
- Parameters:
age
-the age in years.
-
fromString
final Age fromString(String age)
Returns the corresponding age in this enum given a string resembling it.
- Parameters:
age
-the age as a string.
-
-
-
-