Class Plant

  • All Implemented Interfaces:
    android.os.Parcelable

    public class Plant
    extends java.lang.Object
    implements android.os.Parcelable
    This class defines data variables that can be fetched from database
    Since:
    2022-03-01
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface android.os.Parcelable

        android.os.Parcelable.ClassLoaderCreator<T extends java.lang.Object>, android.os.Parcelable.Creator<T extends java.lang.Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static android.os.Parcelable.Creator<Plant> CREATOR
      Regenerates a Plant object from parcel.
      • Fields inherited from interface android.os.Parcelable

        CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
        Plant​(int plantId, java.lang.String plantName, java.lang.String plantType, java.lang.String plantNutrition, java.lang.String plantHealthBenefit, java.lang.String plantFoodSuggestion, java.lang.String plantImgSrc)
      Constructor for plant class
      protected Plant​(android.os.Parcel in)
      Constructor to initialize Plant with data from parcel
    • Constructor Detail

      • Plant

        public Plant​(int plantId,
                     @NotNull
                     java.lang.String plantName,
                     @NotNull
                     java.lang.String plantType,
                     @NotNull
                     java.lang.String plantNutrition,
                     @NotNull
                     java.lang.String plantHealthBenefit,
                     @NotNull
                     java.lang.String plantFoodSuggestion,
                     @NotNull
                     java.lang.String plantImgSrc)
        Constructor for plant class
        Parameters:
        plantId - defines plant ID
        plantName - defines plant name
        plantType - defines plant type
        plantNutrition - defines plant nutrition value
        plantHealthBenefit - defines plant health benefits
        plantFoodSuggestion - defines plant food suggestions
        plantImgSrc - defines plant image source
    • Method Detail

      • getPlantType

        @NotNull
        public java.lang.String getPlantType()
        Gets plant type
        Returns:
        String plant type
      • getPlantId

        @NotNull
        public int getPlantId()
        Gets plant id
        Returns:
        int id
      • getPlantName

        @NonNull
        public java.lang.String getPlantName()
        Gets plant name
        Returns:
        String plant name
      • getPlantNutrition

        @NonNull
        public java.lang.String getPlantNutrition()
        Gets plant nutrition
        Returns:
        String plant nutrition
      • getPlantHealthBenefit

        @NonNull
        public java.lang.String getPlantHealthBenefit()
        Gets plant health benefit
        Returns:
        String plant health benefit
      • getPlantFoodSuggestion

        @NonNull
        public java.lang.String getPlantFoodSuggestion()
        Gets plant food suggestion
        Returns:
        String plant food suggestion
      • getPlantImgSrc

        @NonNull
        public java.lang.String getPlantImgSrc()
        Gets plant image source
        Returns:
        String plant image source