
/**
 * Write a description of class Clausula here.
 * 
 * @author FMM
 * @version (a version number or a date)
 */
import java.util.*;
import java.io.Serializable;
public class Clausula implements Serializable {
    
    
    // Variáveis de Instância
    private String codClausula;
    private String txtClausula;
    private double taxaClausula;

    // Construtores de Clausula
    
    public Clausula() { codClausula = ""; txtClausula = ""; taxaClausula = 0.0; }
    public Clausula(String codClau, String txtClau, double tx) {
        codClausula = codClau; txtClausula = txtClau; taxaClausula = tx; 
    }
    public Clausula(Clausula claus) {
        codClausula = claus.getCodClausula(); 
        txtClausula = claus.getTxtClausula();
        taxaClausula = claus.getTaxaClausula(); 
    }
    
    // Métodos de Instância
    
    // gets
    
    public String getCodClausula() { return codClausula; }
    public String getTxtClausula() { return txtClausula; }
    public double getTaxaClausula() { return taxaClausula; }
    
    // sets
    public void setTxtClausula(String nvTxt) { txtClausula = nvTxt; }
    public void setTaxaClausula(double nvTaxa) { taxaClausula = nvTaxa; }

    // outros
    public Clausula clone() { return new Clausula(this); }
    
    public boolean equals(Object obj) {
      if(this == obj) return true; 
      if((obj == null) || (this.getClass() != obj.getClass())) return false;
      Clausula cl = (Clausula) obj;
      return codClausula.equals(cl.getCodClausula()) &&
             txtClausula.equals(cl.getTxtClausula()) &&
             taxaClausula == cl.getTaxaClausula(); 
    }
    
}
