Package com.example.breeze_seas
Class ExploreViewModel
java.lang.Object
androidx.lifecycle.ViewModel
com.example.breeze_seas.ExploreViewModel
public class ExploreViewModel
extends androidx.lifecycle.ViewModel
This class allows data to be shared between different fragments
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the initialization state of the EventHandler object for the explore fragment.Gets the EventHandler object to be used in the explore fragment.voidsetEventHandler(EventHandler eventHandler) Set the explore fragment EventHandler object.Methods inherited from class androidx.lifecycle.ViewModel
addCloseable, onCleared
-
Constructor Details
-
ExploreViewModel
public ExploreViewModel()
-
-
Method Details
-
setEventHandler
Set the explore fragment EventHandler object.- Parameters:
eventHandler- The EventHandler object pertaining to the explore fragment.
-
getEventHandler
Gets the EventHandler object to be used in the explore fragment.- Returns:
- The EventHandler object pertaining to the explore fragment.
-
eventHandlerIsInitialized
public boolean eventHandlerIsInitialized()Returns the initialization state of the EventHandler object for the explore fragment.- Returns:
- Boolean value describing the initialization state of EventHandler
-