|
SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Need help sorting an array in eclipse
So I am trying to sort an array using Sort() in eclipse but I am not sure how to define the comparator that I want to sort by
Say my array is named arr1 and I want to sort by the default "ShowAPI.GetShowTitle" how do I go about defining that I know I would have sort(arr1, ) not sure what goes after the arr1. I tried sidestepping this and using the default database sortmethods on the array but it doesn't seem to like the sorting method called the same as in studio ie "GetShowTitle" |
#2
|
|||
|
|||
figured out my problem calling default sage sorting but would still like to know how to do it in java if anyone cares to share.
|
#3
|
|||
|
|||
It really depends on what you are sorting...
This is an example of a HashMap<String,CustomObject> where menu is the HashMap: Object[] mi = menu.keySet().toArray(); Arrays.sort(mi, new Comparator() { public int compare(Object o1, Object o2) {This will return you a list of keys in this example sorting on the getPosition method in the CustomObject... If you are sorting sage objects, I found it easy to use Greg's API and use the Sage sort methods... Thanks, Jeff |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
building array in eclipse to pass to studio | PLUCKYHD | SageTV Studio | 8 | 08-04-2009 12:08 PM |
Help with removeall in eclipse | PLUCKYHD | SageTV Studio | 3 | 07-29-2009 10:50 AM |
What is required for a Raid 5 storage array | myoung84 | Hardware Support | 15 | 08-09-2008 09:40 AM |
My Frakking array went south | trini0 | The SageTV Community | 0 | 04-03-2008 04:45 PM |
aaaaaaaaaaaagh! Disk array corrupt. | sleonard | SageTV Software | 41 | 12-23-2004 12:35 PM |