import javax.servlet.http.HttpServletResponse;
import net.pterodactylus.demoscenemusic.data.Artist;
+import net.pterodactylus.demoscenemusic.data.Track;
import net.pterodactylus.demoscenemusic.page.ServletRequest;
import net.pterodactylus.util.io.Closer;
import net.pterodactylus.util.io.StreamCopier;
}
});
+ sortFilter.addComparator(Track.class, new Comparator<Track>() {
+
+ @Override
+ public int compare(Track leftTrack, Track rightTrack) {
+ return leftTrack.name().compareToIgnoreCase(rightTrack.name());
+ }
+
+ });
templateContextFactory.addFilter("sort", sortFilter);
templateContextFactory.addTemplateObject("core", core);