0

I was creating an ordered TreeSet with a Comparator class. However I have a doubt: how can I initialize the maximum size of a TreeSet, when I initialize it with a Comparator class? In my example I would like a TreeSet subscribers of maximum size 50.

this.clienti = new TreeSet <T> (new StructureByNumeroClienteComparator <AbstractCliente> ());

0 Answers0