Object Age.Companion

  • All Implemented Interfaces:

    
    public class Age.Companion
    
                        

    Constants and factories.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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.
      • fromAny

         final Age fromAny(Object age)

        Returns the corresponding age in this enum given a string resembling it.

        Parameters:
        age -
        the age as a string.