Hi,
This is a sorting by keys' natural ordering (ascending) and I need to have also the descending order, can someone help?
I've looked at comparator and again at:
Map map = new TreeMap(Collections.reverseOrder());
but I haven't managed to make it work?
SortedMap sortedMap = new TreeMap()...
Thanks for your advice, I have my code working the way I want now with SortedMap, just sticked an ID at the end of the elements needed and got all the elements as unique.
So it's fine now with SortedMap and I've got the list in ascending order, do you know about the reversed() method to get the...
Hi,
how can I embed the sorted list iList I get at the end of the second while in the html I get in the first while?
ArrayList list = new ArrayList();
Iterator i = items.iterator();
while(i.hasNext())
{
double pc;
Item item = (Item) i.next();
if(item.getNextStage().getStageId() ==...
Forget about the previous question it's fine now; thanks a lot for your previous help with SortedMap it effectively works unfortunately that's not what I wanted as now
it displays only the table in that sorted order and the other columns don't sort anymore, what I wanted it to collect the order...
Hi,
I would need to add this in the html just before the ht.put:
<td class=columnwhite width="75">
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border:1px solid #000000;">
<tr>
<% if (pc > 0.00001) {%>
<td width="<%=pc%>%"><img src="images/bargrph_blue.gif"...
Sorry, just seen your last reply, but yes that's what I want, even a bit more difficult as when I click on the top of the column it should display the contents as you say:
10% retrett ppppppss
20% dfsdfsd dfdsfsdf
35% wwewwww ghghghh
50% rrgbbhb qqqwesee
in ascending or descinding order...
sorry Sedj,
but I didn't leave the other columns as I didn't want to confuse you but I need to stay in the same while loop for the other results like item.get......
<td class=columnwhite><%=item.getItemType().getDescription()%></td>
<td class=columnwhite><%=item.getSystem().getName()%></td>...
sorry... how can you guess!
DecimalFormat roundPercentage = new DecimalFormat("0");
...
...
Iterator i = items.iterator();
while(i.hasNext()) {
double pc;
int k =0;
Item item = (Item) i.next();
if(item.getNextStage().getStageId() == Stage.DONE) {
pc = 100.0;
}
else {
int done =...
Ok, I've tried your method and it effectively works so I guess
I am not using the right method, roundPercentage.format(pc) is inside a while loop and this method doesn't sort all the elements? Am I missing something or should I use another method?
TreeSet ts = new TreeSet ();
ts.add...
Hi,
I am using this class for the first time and I am confused as I thought that SortedSet will sort the content of ts but it doesn't?
If I print out ts or orderComplete the content will be in the same order. Any advice available?
TreeSet ts = new TreeSet ();
ts.add...
Im not surprise, don't think I've explained very well!
We are now using Apache Torque and Im new to it...
I try again
This produce queries like sql:
Criteria cr = new Criteria();
cr.addJoin(ItemPeer.SYSTEMID, SystemPeer.SYSTEMID);
cr.addJoin(ItemPeer.STAGEID, StagePeer.STAGEID)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.