Public feed
#893276
/* * APC.java * * Created on November 10, 2007, 3:34 PM * * To change this template, choose Tools | Template Manager * and open the template in the editor. */package aisim;import java.util.Hashtable;import java.util.Iterator;public class APC { private Hashtable<String, Peptide> peptides; private String META_INFO; private int totalPeptides; //** Construtor da APC**/ public APC() { peptides = new Hashtable<String, Peptide>(); META_INFO = null; totalPeptides = 0; } //** Método que faz o update da APC**/ public void updateAPC(String pattern) { Peptide auxPeptide; if ((auxPeptide = this.getPeptides().get(pattern)) == null) { getPeptides().put(pattern, new Peptide(pattern)); } else { auxPeptide.addCountAPC(); } totalPeptides++; } //** M�todo que processa a APC**/ public void processAPC(boolean testingMode, int iterationAPC) { APCSet.getInstance().insertAPC(this); if (testingMode) { TCellReportory.getInstance().tCellReportoryUpdateMatchTesting(iterationAPC); } else { TCellReportory.getInstance().tCellReportoryUpdateMatchTraining(iterationAPC); } } //** Método que mostra o conteudo da APC**/ /* public void showAPC() { String aPCPeptides = "APC ["; for (Iterator<Peptide> it = peptides.values().iterator(); it.hasNext();) { Peptide peptideAux = it.next(); aPCPeptides += peptideAux.getLigand() + "(" + peptideAux.getCountAPC() + ");"; } aPCPeptides += "]"; System.out.print(aPCPeptides); }*/ //** M�todo que devolde a HashTable de Pept�deos**/ public Hashtable<String, Peptide> getPeptides() { return this.peptides; } public String getMETA_INFO() { return META_INFO; } public void setMETA_INFO(String META_INFO) { this.META_INFO = META_INFO; } public int getTotalPeptides() { return totalPeptides; }}