🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.java
Article #150530

Re: Sortowanie arraylist arraylisty

#150530
From: Brzezi
Date: Thu, 01 Jul 2010 15:30
19 lines
1445 bytes
czw, 01 lip 2010 o 17:17 GMT, Buffalo napisał(a):

> Próbowałem napisać coś takiego:
> 	final Collator col = Collator.getInstance();
> 	Collections.sort(listaMain, new Comparator<ArrayList<String>>() {
> 
> 	    @Override
> 	    public int compare(ArrayList<String> o1, ArrayList<String> o2) {
> 		col.compare(o1.get(1), o2.get(1));
                ^
chociaz w twoim przykladzie wystarczyloby tutaj dodac return, i juz bedzie
dzialac, jezeli rzeczywiscie potrzebujesz collatora, jezeli nie, to obok
tez podalem inne rozwiazanie

> 	    }
> 	});

Pozdrawiam
	Brzezi
Technical Details
Message-ID: <slrn.pl.i2pd44.d38.brzezi@brzezi.chello.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.atman.pl!not-for-mail
References: <9795fe35-71e8-406c-9898-57b1fdb0a0e1@z8g2000yqz.googlegroups.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.atman.pl!not-for-mail
From: Brzezi <brzezi@gmail.com>
Newsgroups: pl.comp.lang.java
Subject: Re: Sortowanie arraylist arraylisty
Date: Thu, 1 Jul 2010 17:30:12 +0200
Organization: Hard Core Slrn-pl User
Lines: 19
Message-ID: <slrn.pl.i2pd44.d38.brzezi@brzezi.chello.pl>
References: <9795fe35-71e8-406c-9898-57b1fdb0a0e1@z8g2000yqz.googlegroups.com>
NNTP-Posting-Host: 82-210-139-160.home.aster.pl
Mime-Version: 1.0
X-Trace: node1.news.atman.pl 1277998208 17086 82.210.139.160 (1 Jul 2010 15:30:08 GMT)
X-Complaints-To: usenet@atman.pl
NNTP-Posting-Date: Thu, 1 Jul 2010 15:30:08 +0000 (UTC)
X-Licznik: 10948
User-Agent: slrn/0.9.7.4 (pl-1.4.3) (Linux/2.6.32-22-generic (i686))
X-NNTP-Posting-Host: localhost
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit