optaplanner-core/src/main/java/org/optaplanner/core/api/score/constraint/Indictment.java
@Override
    public int compareTo(Indictment other) {
        if (!(justification instanceof Comparable)) {
            throw new IllegalStateException("The justification (" + justification + ") does not implement "
                    + Comparable.class.getSimpleName() + ", so it cannot be compared with otherJustification ("
                    + other.justification + ").");
        }
        return ((Comparable) justification).compareTo(other.justification);
    }
@Override
    public int compareTo(Indictment other) {
        if (!(justification instanceof Comparable)) {
            throw new IllegalStateException("The justification (" + justification + ") does not implement "
                    + Comparable.class.getSimpleName() + ", so it cannot be compared with otherJustification ("
                    + other.justification + ").");
        }
        return ((Comparable) justification).compareTo(other.justification);
    }
@ Override public int compareTo ( Indictment other ) { if ( ! ( justification instanceof Comparable ) ) { throw new IllegalStateException ( "The justification (" + justification + ") does not implement " + Comparable . class . getSimpleName ( ) + ", so it cannot be compared with otherJustification (" + other . justification + ")." ) ; } return ( ( Comparable ) justification ) . compareTo ( other . justification ) ; }
************************************************************************
************************************************************************