YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.browser.BrowseSorter Class Reference

The client-side sort of a fully loaded folder (issue #252), kept free of the adapter so it can run on a worker thread: it never touches the list it is given, it returns a sorted copy. More...

Collaboration diagram for de.yaacc.browser.BrowseSorter:
Collaboration graph

Classes

class  Result
 The sorted copy and what changed against the input.
 

Static Public Member Functions

static Result sort (List<? extends DIDLObject > input, BrowseContentItemAdapter.SortMode mode, boolean nameAscending, boolean dateAscending)
 
static boolean hasDate (DIDLObject object)
 

Detailed Description

The client-side sort of a fully loaded folder (issue #252), kept free of the adapter so it can run on a worker thread: it never touches the list it is given, it returns a sorted copy.

No Android classes.

The orderings are the former comparators of BrowseContentItemAdapter, unchanged:

  • NAME: containers before items regardless of direction, titles compared ignoring case (a missing title counts as empty), the comparison reverses with the direction.
  • DATE: containers and items interleaved by dc:date; a missing or unparseable date sorts last in either direction.

Both sorts are stable, like List#sort.


The documentation for this class was generated from the following file: