sk.baka.ambient.collection
Class CollectionUtils

java.lang.Object
  extended by sk.baka.ambient.collection.CollectionUtils

public final class CollectionUtils
extends Object

Various collection utility methods.

Author:
Martin Vysny

Nested Class Summary
protected static class CollectionUtils.AlbumOrderComparator
          Orders the tracks by albums, track number and finally by displayable name.
 
Field Summary
static Comparator<TrackMetadataBean> ALBUM_ORDER_COMPARATOR
          Orders the tracks by albums, track number and finally by filenames.
 
Method Summary
static void sortByAlbumOrder(List<TrackMetadataBean> playlist)
          Sorts the tracks by albums, track number and finally by filenames.
static void sortByName(List<CategoryItem> items)
          Sorts given category item list by CategoryItem.name.
static void sortByTitle(List<TrackMetadataBean> tracks)
          Sorts given track list by TrackMetadataBean.getDisplayableName().
static void sortByYearName(List<CategoryItem> items)
          Sorts given category item list by CategoryItem.name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALBUM_ORDER_COMPARATOR

public static final Comparator<TrackMetadataBean> ALBUM_ORDER_COMPARATOR
Orders the tracks by albums, track number and finally by filenames.

Method Detail

sortByName

public static void sortByName(List<CategoryItem> items)
Sorts given category item list by CategoryItem.name.

Parameters:
items - the items to sort.

sortByYearName

public static void sortByYearName(List<CategoryItem> items)
Sorts given category item list by CategoryItem.name.

Parameters:
items - the items to sort.

sortByTitle

public static void sortByTitle(List<TrackMetadataBean> tracks)
Sorts given track list by TrackMetadataBean.getDisplayableName().

Parameters:
tracks - the tracks to sort.

sortByAlbumOrder

public static void sortByAlbumOrder(List<TrackMetadataBean> playlist)
Sorts the tracks by albums, track number and finally by filenames.

Parameters:
playlist - the playlist to sort.


Copyright © 2007-2008. All Rights Reserved.