SpecialOne Posted May 17, 2009 at 06:35 PM Report #264873 Posted May 17, 2009 at 06:35 PM A ideia é fazer o construtor das partes, public Carteira(String nome,HashSet<Titulo> titulos,int totCom, int totVen, double totCCom, double totCVen ){ titular = nome; totalCompras = totCom; totalVendas = totVen; totalComCompra = totCCom; totalComVenda = totCVen; lstCarteira = new TreeMap<String,Titulos>(); A ideia é por dentro do treeMap na Key o valor dado "nome" e no valor o hashset<Titulo> Deveria ficar alguma coisa do genero TreeMap<nome,titulos> onde titulos é um hashSet de titulo. É possivel fazer isto? }
bruno1234 Posted May 17, 2009 at 06:40 PM Report #264878 Posted May 17, 2009 at 06:40 PM Sim, é possivel. Matraquilhos para Android. Gratuito na Play Store. https://play.google.com/store/apps/details?id=pt.bca.matraquilhos
SpecialOne Posted May 17, 2009 at 07:03 PM Author Report #264889 Posted May 17, 2009 at 07:03 PM Como?
bruno1234 Posted May 17, 2009 at 07:07 PM Report #264891 Posted May 17, 2009 at 07:07 PM lstCarteira.put(nome, titulos); É só isto. E para aceder: HashSet<titulo> hsTitulos = lstCarteira.get(nome); Matraquilhos para Android. Gratuito na Play Store. https://play.google.com/store/apps/details?id=pt.bca.matraquilhos
SpecialOne Posted May 17, 2009 at 07:12 PM Author Report #264893 Posted May 17, 2009 at 07:12 PM Ja tentei fazer assim mas esta a dar-me o seguinte erro: "cannot find symbol - method put(java.lang.String,java.util.HasSet<Titulo>)" e tenho os seguintes import's: import java.util.TreeSet; import java.util.TreeMap; import java.util.HashSet;
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now