BlackBerry Forums Support Community

Closed Thread
LinkBack Thread Tools
Old 11-17-2010, 09:42 AM   #1 (permalink)
New Member
Join Date: Nov 2010
Model: 8520
Carrier: Vodafone
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default sorting a text file

Please Login to Remove!

HEllo All,
I am successfully able to read and print the contents of a text file. My text file contains 5 data entries such as 1.Rashmi 120
2.Prema 900 and so on. It must sort only the integers in descending order and swap the respective names attached to them. the first column must remain the same.each time a new entry is made that score must be compared to the existing 5 records and placed accordingly with new name and score. Since this is blackberry programming and blackberry APIs dont support collections.sort,please tell me how do I do this
Old 11-17-2010, 09:44 AM   #2 (permalink)
BlackBerry Extraordinaire
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default Re: sorting a text file

Use SimpleSortingVector, and write your own Comparator implementation to sort the data way you want it.

It's all in the javadocs.
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads for: sorting a text file
Thread Thread Starter Forum Replies Last Post
Transferring / Importing Contacts from CSV file 0x80040057 error - How to fix tkessler2 General BlackBerry Discussion 1 01-08-2010 09:19 AM
Unite! Help Guide Sith_Apprentice BlackBerry Unite 17 12-25-2008 02:08 PM
Please help with text file to computer!!! aliengroovester General Legacy Device Discussion 2 09-06-2007 01:20 AM
Step-by-step tutorial on creating custom BlackBerry device themes! d_fisher BlackBerry Themes 0 10-17-2006 07:30 AM
How to get a simple text file to my BB ? haham General BlackBerry Discussion 3 09-24-2005 02:17 PM

Bull Frog #BDS100, 3/4 HP Cartridge 230V For DENTSPLY Vacuum Pump Model MVS 1.5
Bull Frog #BDS100, 3/4 HP Cartridge 230V For DENTSPLY Vacuum Pump Model MVS 1.5 pictureNew Zurn Wilkin 35XL Atmospheric Vacuum Breaker 1-1/2" FNPT Inlet and Outlet
New Zurn Wilkin 35XL Atmospheric Vacuum Breaker 1-1/2Vacuum Pump MAXI Blue Nylon & Brass with Gauge
Vacuum Pump MAXI Blue Nylon & Brass with Gauge pictureUHV hose 48in KF25 braided
UHV hose 48in KF25 braided pictureUHV hose 18.25in KF40 hydroformed
UHV hose 18.25in KF40 hydroformed picture

Copyright 2004-2016
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.