BrightSide Workbench Full Report + Source Code
org.turro.dossier.dossier.DossierComparator Class Reference
Inheritance diagram for org.turro.dossier.dossier.DossierComparator:
Collaboration diagram for org.turro.dossier.dossier.DossierComparator:

Public Member Functions

int compare (Object o1, Object o2)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 27 of file DossierComparator.java.

Member Function Documentation

◆ compare()

int org.turro.dossier.dossier.DossierComparator.compare ( Object  o1,
Object  o2 
)

Definition at line 32 of file DossierComparator.java.

32  {
33  Dossier d1 = (Dossier) o1, d2 = (Dossier) o2;
34  String c1 = nullString, c2 = nullString;
35  if(d1.getCategory() != null) {
36  c1 = (d1.getCategory().getFullDescription() + nullString).substring(0, nullString.length());
37  }
38  if(d2.getCategory() != null) {
39  c2 = (d2.getCategory().getFullDescription() + nullString).substring(0, nullString.length());
40  }
41  c1 += d1.getDescription() + "---" + d1.getId();
42  c2 += d2.getDescription() + "---" + d2.getId();
43  return c1.compareTo(c2);
44  }
Here is the call graph for this function:

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