Newer
Older
CitrusClient / app / src / main / java / com / example / citrusclient / models / Account.java
package com.example.citrusclient.models;

public class Account {

    private String accountId;
    private String accountColor;

    public Account(){}

    public Account(String aid, String color) {
        accountId = aid;
        accountColor = color;
    }

    public void setAccountId(String accountId) {
        this.accountId = accountId;
    }

    public void setAccountColor(String accountColor) {
        this.accountColor = accountColor;
    }

    public String getAccountId() {
        return accountId;
    }

    public String getAccountColor() {
        return accountColor;
    }

    @Override
    public boolean equals(Object obj) {
        if(obj instanceof Account) {
            if(((Account) obj).getAccountId().equals(this.accountId)) {
                return  true;
            }
        }
        return false;
    }

    @Override
    public int hashCode(){
        return this.accountId.hashCode();
    }

}