package com.biotronisis.pettplant.plant.processor;

import com.biotronisis.pettplant.model.ColorMode;
import com.biotronisis.pettplant.model.Entrainment;

import java.io.Serializable;

public class PlantState implements Serializable {
    // Using Serializable to send objects from one activity to another

    private Entrainment.Sequence entrainSequence;
    private Entrainment.State entrainmentState;
    private Entrainment.LoopCheckbox loopCheckbox;
    private ColorMode.Mode colorMode;
    private ColorMode.State colorModeState;
    private int colorModeSpeed;

    public Entrainment.Sequence getEntrainSequence() {
        return entrainSequence;
    }

    void setEntrainSequence(Entrainment.Sequence entrainSequence) {
        this.entrainSequence = entrainSequence;
    }

    public Entrainment.State getEntrainmentState() {
        return entrainmentState;
    }

    void setEntrainmentState(Entrainment.State entrainmentState) {
        this.entrainmentState = entrainmentState;
    }

    public Entrainment.LoopCheckbox getLoopCheckbox() {
        return loopCheckbox;
    }

    void setLoopCheckbox(Entrainment.LoopCheckbox loopCheckbox) {
        this.loopCheckbox = loopCheckbox;
    }

    public ColorMode.Mode getColorMode() {
        return colorMode;
    }

    void setColorMode(ColorMode.Mode colorMode) {
        this.colorMode = colorMode;
    }

    public ColorMode.State getColorModeState() {
        return colorModeState;
    }

    void setColorModeState(ColorMode.State colorModeState) {
        this.colorModeState = colorModeState;
    }

    public int getColorModeSpeed() {
        return colorModeSpeed;
    }

    void setColorModeSpeed(int colorModeSpeed) {
        this.colorModeSpeed = colorModeSpeed;
    }

    @Override
    public String toString() {
        return "PlantState{" +
              "entrainSequence=" + entrainSequence +
              ", entrainmentState=" + entrainmentState +
              ", loopCheckbox=" + loopCheckbox +
              ", colorMode=" + colorMode +
              ", colorModeState=" + colorModeState +
              ", colorModeSpeed=" + colorModeSpeed +
              '}';
    }
}

@@ -1748,24 +1748,689 @@
 eed;%0A    %7D%0A%0A
+    @Override%0A    public boolean equals(Object obj) %7B%0A%0A        if (obj.getClass() == PlantState.class) %7B%0A            PlantState pS = (PlantState) obj;%0A            if (this.entrainSequence != pS.entrainSequence)   return false;%0A            if (this.entrainmentState != pS.entrainmentState) return false;%0A            if (this.loopCheckbox != pS.loopCheckbox)         return false;%0A            if (this.colorMode != pS.colorMode)               return false;%0A            if (this.colorModeState != pS.colorModeState)     return false;%0A            if (this.colorModeSpeed != pS.colorModeSpeed)     return false;%0A        %7D else return false;%0A%0A        return true;%0A    %7D%0A%0A
     @Overrid

Add an equals method.