|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.cnes.sitools.common.model.ResourceComparator<T>
T
- class of SITools resources to be sortedpublic class ResourceComparator<T>
Generic class for sorting SITools objects based on ResourceCollectionFilter definition.
Field Summary | |
---|---|
static java.lang.String |
ASC
Ascending comparison |
static java.lang.String |
DESC
Decreasing comparison |
static java.lang.String |
FIELD_DESCRIPTION
Description of the field |
static java.lang.String |
FIELD_ID
ID of the field |
static java.lang.String |
FIELD_NAME
Name of the field |
Constructor Summary | |
---|---|
ResourceComparator(ResourceCollectionFilter filter)
Constructor with ResourceFilter |
Method Summary | |
---|---|
int |
compare(IResource o1,
IResource o2)
Compare two resources |
int |
compare(java.lang.String o1,
java.lang.String o2)
Compare two String objects according to filter parameters |
int |
compare(T o1,
T o2)
|
ResourceCollectionFilter |
getFilter()
Gets the filter value |
void |
setFilter(ResourceCollectionFilter filter)
Sets the value of filter |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
---|
equals |
Field Detail |
---|
public static final java.lang.String DESC
public static final java.lang.String ASC
public static final java.lang.String FIELD_ID
public static final java.lang.String FIELD_NAME
public static final java.lang.String FIELD_DESCRIPTION
Constructor Detail |
---|
public ResourceComparator(ResourceCollectionFilter filter)
filter
- ResourceFilterMethod Detail |
---|
public final ResourceCollectionFilter getFilter()
public final void setFilter(ResourceCollectionFilter filter)
filter
- the filter to setpublic int compare(T o1, T o2)
compare
in interface java.util.Comparator<T>
public final int compare(IResource o1, IResource o2)
o1
- resource 1o2
- resource 2
public final int compare(java.lang.String o1, java.lang.String o2)
o1
- Stringo2
- String
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |