00001 package plp.orientadaObjetos1.memoria.colecao; 00002 00003 00004 import java.util.Hashtable; 00005 00006 import plp.orientadaObjetos1.util.Tipo; 00007 00011 public class HashTipoTipo { 00012 00016 private Hashtable tabela; 00017 00021 public HashTipoTipo() { 00022 this.tabela = new Hashtable(); 00023 } 00024 00032 public Tipo put(Tipo tipoGeneric, Tipo tipoReal) { 00033 Object result = tabela.put(tipoGeneric, tipoReal); 00034 if (result == null) { 00035 return null; 00036 } else { 00037 return (Tipo) result; 00038 } 00039 } 00040 00047 public Tipo get(Tipo id) { 00048 Object result = tabela.get(id); 00049 if (result == null) { 00050 return null; 00051 } else { 00052 return (Tipo) result; 00053 } 00054 } 00055 }