@ Nullable public static DayOfTheWeek valueOf ( @ Nullable final DayOfWeek dayOfWeek ) { if ( dayOfWeek == null ) { return null ; } final int value = dayOfWeek . getValue ( ) ; for ( final DayOfTheWeek dow : ALL ) { if ( value == dow . id ) { return dow ; } } throw new IllegalArgumentException ( "Unknown day week: " + dayOfWeek ) ; }
Converts the instance into java time instance .