blob: 25d226d7c01bfacbb1838715a76f6aca67162b32 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
package github.daneren2005.dsub.domain;
import android.content.Context;
import android.content.SharedPreferences;
import java.io.Serializable;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import github.daneren2005.dsub.util.Constants;
import github.daneren2005.dsub.util.Util;
public class Genre implements Serializable {
private String name;
private String index;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getIndex() {
return index;
}
public void setIndex(String index) {
this.index = index;
}
@Override
public String toString() {
return name;
}
public static class GenreComparator implements Comparator<Genre> {
@Override
public int compare(Genre genre1, Genre genre2) {
return genre1.getName().compareToIgnoreCase(genre2.getName());
}
public static List<Genre> sort(List<Genre> genres) {
Collections.sort(genres, new GenreComparator());
return genres;
}
}
}
|