Hi All,
I could really use some help in sorting vectors, i know the collections.sort(x) method will sort a vector of numbers etc however i have a vector full of objects and i need to sort them; the object contains details of a website please find the fields below;
private String shortName;
private String contact;
private String URL;
private String country;
private String dateAccessed;
private String image;
private double rank;
private int popularity;
private Vector<String> keywords;
I need to sort the vector holding (multiple of these objects) by the following criteria
- Display results sorted by rank (1 being the highest rank)
- Display results sorted by popularity (largest to smallest)
- Display results sorted by date accessed (most recent 1st)
Could somebody please let me know the most efficient way of doing this with some examples thanks
Regards,
Sinister747