@Override public int compareTo(InterventionSchedule interventionSchedule) { return intervention .getBezeichnung() .compareTo(interventionSchedule.getIntervention().getBezeichnung()); // if (uhrzeit != null && interventionSchedule.getUhrzeit() == null){ // return -1; // } // if (uhrzeit == null && interventionSchedule.getUhrzeit() != null){ // return 1; // } // if (uhrzeit != null){ // return uhrzeit.compareTo(interventionSchedule.getUhrzeit()); // } // if (isDaily() && !interventionSchedule.isDaily()){ // return 1; // } // if (!isDaily() && interventionSchedule.isDaily()){ // return -1; // } // if (isDaily()){ // return new Short(getTaeglich()).compareTo(interventionSchedule.getTaeglich()); // } // if (isWeekly() && !interventionSchedule.isWeekly()){ // return 1; // } // if (!isWeekly() && interventionSchedule.isWeekly()){ // return -1; // } // if (isWeekly()){ // return new // Short(getWoechentlich()).compareTo(interventionSchedule.getWoechentlich()); // } // }