18 package org.turro.financials.model.register;
20 import org.turro.financials.db.FinancialsPU;
21 import org.turro.financials.entity.Account;
22 import org.turro.financials.entity.RegisterView;
23 import org.turro.jpa.Dao;
24 import org.turro.math.Zero;
25 import org.turro.util.CompareUtil;
53 this.account = dao.find(
Account.class, idAccount);
62 if (getClass() != obj.getClass()) {
66 if (this.view != other.
view && (
this.view ==
null || !
this.view.equals(other.
view))) {
69 if (this.account != other.
account && (
this.account ==
null || !
this.account.equals(other.
account))) {
72 if (Double.doubleToLongBits(
this.balance) != Double.doubleToLongBits(other.
balance)) {
81 hash = 19 * hash + (this.view !=
null ? this.view.hashCode() : 0);
82 hash = 19 * hash + (this.account !=
null ? this.account.hashCode() : 0);
83 hash = 19 * hash + (int) (Double.doubleToLongBits(
this.balance) ^ (Double.doubleToLongBits(this.balance) >>> 32));
AccountItem(long idView, String idAccount, double balance)
int compareTo(AccountItem o)
static AccountItem createAccountItem(RegisterView view, Account account, double balance)
AccountItem(RegisterView view, Account account, double balance)
boolean equals(Object obj)
static boolean near(double value, int digits)