Skip to main content
0 online
suchgr8heights Jan 12, 2005

It's driving me mad that on the homepage, the online users are not in alpha.

iwz iwz

Fixed.

flomojopoanode flomojopoanodeFounder

I don't think it's fixed. SpecialK is before Flomojopoanode. There's still a problem there...

yay yayOG 2004

in ASCII it does :) capital letters

flomojopoanode flomojopoanodeFounder

ah HA!

iwz iwz

haha, yeah, I guess TreeMaps don't sort case insensitive. haha. I only tested it with lower case user names.

deanh77 deanh77Founder

If you don't specify a Comparator, it uses "natural order" (for anything that sorts. You could fix this by instantiating the TreeMap with the following Comparator:

public class IgnoreCaseStringComparator implements Comparator {

public int compare(Object o1, Object o2) {

((String)o1).compareToIgnoreCase((String)o2);
}
}

also check if they are null in the comparator, and if they are both String objects.

(I love Comparators)

iwz iwz

I love Comparators too! Use them a lot. Just forgot about the ASCII sort thing at 2am, haha.

Thanks for writing that for me, btw, saves me some time :)

deanh77 deanh77Founder

no prob. I knew that you knew how to do it.

iwz iwz

haha you sound like a proud father

Welcome Back to eZabel

It's been a while. Here's what's new.

eZabel Lore

A complete history of our community — stats, Hall of Fame, legendary threads, and more.

View the Lore →

Everything Preserved

All 225,969 pieces of content from 2000–2014 are here — forums, messages, journals, photos, polls, and events.

💎

Gems

Spot something you love — a legendary comment, a classic thread, a great photo? Log in and click the diamond icon to mark it as a Gem. Add a note about why it's special. The best stuff surfaces on the Gems page.