/*
 * MIT License
 *
 * Copyright (c) 2018-2019 Daniel Cortes
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

package danielcortes.xyz.models.efectivo;

import danielcortes.xyz.models.caja.Caja;
import java.util.Objects;

public class Efectivo {
  public final static Efectivo EMPTY;

  static {
   EMPTY = new Efectivo();
   EMPTY.setCaja(Caja.EMPTY);
  }

  private int id;
  private int veinteMil;
  private int diezMil;
  private int cincoMil;
  private int dosMil;
  private int mil;
  private int quinientos;
  private int cien;
  private int cincuenta;
  private int diez;
  private Caja caja;

  public int getId() {
    return id;
  }

  public void setId(int id) {
    this.id = id;
  }

  public int getVeinteMil() {
    return veinteMil;
  }

  public void setVeinteMil(int veinteMil) {
    this.veinteMil = veinteMil;
  }

  public int getDiezMil() {
    return diezMil;
  }

  public void setDiezMil(int diezMil) {
    this.diezMil = diezMil;
  }

  public int getCincoMil() {
    return cincoMil;
  }

  public void setCincoMil(int cincoMil) {
    this.cincoMil = cincoMil;
  }

  public int getDosMil() {
    return dosMil;
  }

  public void setDosMil(int dosMil) {
    this.dosMil = dosMil;
  }

  public int getMil() {
    return mil;
  }

  public void setMil(int mil) {
    this.mil = mil;
  }

  public int getQuinientos() {
    return quinientos;
  }

  public void setQuinientos(int quinientos) {
    this.quinientos = quinientos;
  }

  public int getCien() {
    return cien;
  }

  public void setCien(int cien) {
    this.cien = cien;
  }

  public int getCincuenta() {
    return cincuenta;
  }

  public void setCincuenta(int cincuenta) {
    this.cincuenta = cincuenta;
  }

  public int getDiez() {
    return diez;
  }

  public void setDiez(int diez) {
    this.diez = diez;
  }

  public Caja getCaja() {
    return caja;
  }

  public void setCaja(Caja caja) {
    this.caja = caja;
  }

  @Override
  public String toString() {
    return "Efectivo{" +
        "id=" + id +
        ", veinteMil=" + veinteMil +
        ", diezMil=" + diezMil +
        ", cincoMil=" + cincoMil +
        ", dosMil=" + dosMil +
        ", mil=" + mil +
        ", quinientos=" + quinientos +
        ", cien=" + cien +
        ", cincuenta=" + cincuenta +
        ", diez=" + diez +
        ", caja=" + caja +
        '}';
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (!(o instanceof Efectivo)) {
      return false;
    }
    Efectivo efectivo = (Efectivo) o;
    return id == efectivo.id &&
        veinteMil == efectivo.veinteMil &&
        diezMil == efectivo.diezMil &&
        cincoMil == efectivo.cincoMil &&
        dosMil == efectivo.dosMil &&
        mil == efectivo.mil &&
        quinientos == efectivo.quinientos &&
        cien == efectivo.cien &&
        cincuenta == efectivo.cincuenta &&
        diez == efectivo.diez &&
        Objects.equals(caja, efectivo.caja);
  }

  @Override
  public int hashCode() {
    return Objects
        .hash(id, veinteMil, diezMil, cincoMil, dosMil, mil, quinientos, cien, cincuenta, diez,
            caja);
  }
}
