question: public boolean isTextValid ( String text ) { if ( text == null ) { return false ; } text = text . trim ( ) ; if ( text . isEmpty ( ) ) { return settings . getAllowEmptyTimes ( ) ; } LocalTime parsedTime = InternalUtilities . getParsedTimeOrNull ( text , settings . getFormatForDisplayTime ( ) , settings . getFormatForMenuTimes ( ) , settings . formatsForParsing , settings . getLocale ( ) ) ; if ( parsedTime == null ) { return false ; } TimeVetoPolicy vetoPolicy = settings . getVetoPolicy ( ) ; if ( InternalUtilities . isTimeVetoed ( vetoPolicy , parsedTime ) ) { return false ; } return true ; }
target:  isTextValid, This function can be used to see if the supplied text represents a "valid time" according to the settings of this time picker. More specifically, this returns true if: 1) the text contains a parsable time that exists, and that has not been vetoed by a current veto policy, OR 2) (allowEmptyTimes == true) and text.trim() contains an empty string. Otherwise returns false.