diff --git a/app/src/main/java/com/example/citrusclient/models/Account.java b/app/src/main/java/com/example/citrusclient/models/Account.java new file mode 100644 index 0000000..4e07e63 --- /dev/null +++ b/app/src/main/java/com/example/citrusclient/models/Account.java @@ -0,0 +1,46 @@ +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(); + } + +}