package br.edu.ifba.ads.mediaCenter.util;

public class Buscador{
  
    public Buscavel buscar(Buscavel[] buscaveis, Object id){
        try {
	        for(Buscavel b : buscaveis)
	            if(b.ehChave(id))
	              return b;
				throw new Exception();
		} catch (Exception e) {
			System.err.println("NO ACHEI O BUSCAVEL:" );
			e.printStackTrace();
		}
		return null;
    }    
}
