Package org.apache.commons.lang.builder

Examples of org.apache.commons.lang.builder.CompareToBuilder


                .append(shiftDate)
                .toHashCode();
    }

    public int compareTo(EmployeeConsecutiveAssignmentEnd other) {
        return new CompareToBuilder()
                .append(employee, other.employee)
                .append(shiftDate, other.shiftDate)
                .toComparison();
    }
View Full Code Here


                .append(lastDayIndex)
                .toHashCode();
    }

    public int compareTo(EmployeeFreeSequence other) {
        return new CompareToBuilder()
                .append(employee, other.employee)
                .append(firstDayIndex, other.firstDayIndex)
                .append(lastDayIndex, other.lastDayIndex)
                .toComparison();
    }
View Full Code Here

                .append(total)
                .toHashCode();
    }

    public int compareTo(EmployeeAssignmentTotal other) {
        return new CompareToBuilder()
                .append(employee, other.employee)
                .append(total, other.total)
                .toComparison();
    }
View Full Code Here

                .append(lastSundayIndex)
                .toHashCode();
    }

    public int compareTo(EmployeeWeekendSequence other) {
        return new CompareToBuilder()
                .append(employee, other.employee)
                .append(firstSundayIndex, other.firstSundayIndex)
                .append(lastSundayIndex, other.lastSundayIndex)
                .toComparison();
    }
View Full Code Here

public class ShiftAssignmentDifficultyComparator implements Comparator<ShiftAssignment>, Serializable {

    public int compare(ShiftAssignment a, ShiftAssignment b) {
        Shift aShift = a.getShift();
        Shift bShift = b.getShift();
        return new CompareToBuilder()
                    .append(bShift.getShiftDate(), aShift.getShiftDate()) // Descending
                    .append(bShift.getShiftType(), aShift.getShiftType()) // Descending
                    // For construction heuristics, scheduling the shifts in sequence is better
                    .append(aShift.getRequiredEmployeeSize(), bShift.getRequiredEmployeeSize())
                    .toComparison();
View Full Code Here

                .append(sundayIndex)
                .toHashCode();
    }

    public int compareTo(EmployeeConsecutiveWeekendAssignmentStart other) {
        return new CompareToBuilder()
                .append(employee, other.employee)
                .append(sundayIndex, other.sundayIndex)
                .toComparison();
    }
View Full Code Here

public class EmployeeStrengthComparator implements Comparator<Employee>, Serializable {

    public int compare(Employee a, Employee b) {
        // TODO refactor to DifficultyWeightFactory and use getContract().getContractLineList()
        // to sum maximumValue and minimumValue etc
        return new CompareToBuilder()
                .append(b.getWeekendLength(), a.getWeekendLength()) // Descending
                .append(a.getId(), b.getId())
                .toComparison();
    }
View Full Code Here

                .append(shiftDate)
                .toHashCode();
    }

    public int compareTo(EmployeeConsecutiveAssignmentStart other) {
        return new CompareToBuilder()
                .append(employee, other.employee)
                .append(shiftDate, other.shiftDate)
                .toComparison();
    }
View Full Code Here

                .append(sundayIndex)
                .toHashCode();
    }

    public int compareTo(EmployeeConsecutiveWeekendAssignmentEnd other) {
        return new CompareToBuilder()
                .append(employee, other.employee)
                .append(sundayIndex, other.sundayIndex)
                .toComparison();
    }
View Full Code Here

                .append(lastDayIndex)
                .toHashCode();
    }

    public int compareTo(EmployeeWorkSequence other) {
        return new CompareToBuilder()
                .append(employee, other.employee)
                .append(firstDayIndex, other.firstDayIndex)
                .append(lastDayIndex, other.lastDayIndex)
                .toComparison();
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.lang.builder.CompareToBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.