package Ġcom . g ds ct sec . smart t . view model Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġandroidx . lifecycle . ViewModel Provider Ċ import Ġjava . lang . IllegalArgumentException Ċ Ċ class ĠWeek day Activity ViewModel Factory ( val Ġcontext : ĠContext , private Ġval Ġweek day : String ): ViewModel Provider . Factory Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġ< T Ġ: ĠViewModel ?> Ġcreate ( model Class : ĠClass < T >): ĠT Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ( model Class . isAssignableFrom ( Week day Act v ity ViewModel :: class . java )){ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn ĠWeek day Act v ity ViewModel ( context , weekday ) Ġas ĠT ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġthrow ĠIllegalArgumentException (" view Ġmodel Ġnot Ġfound ") ĊĠĠĠ Ġ} Ċ Ċ }