/** * Create an ordering on {@link FlowExecutionStatus} instances by comparing * their statuses. * * @see Comparable#compareTo(Object) * * @param other instance of {@link FlowExecutionStatus} to compare this instance with. * @return negative, zero or positive as per the contract */ @Override public int compareTo(FlowExecutionStatus other) { Status one = Status.match(this.name); Status two = Status.match(other.name); int comparison = one.compareTo(two); if (comparison == 0) { return this.name.compareTo(other.name); } return comparison; }
/** * Create an ordering on {@link FlowExecutionStatus} instances by comparing * their statuses. * * @see Comparable#compareTo(Object) * * @param other * @return negative, zero or positive as per the contract */ public int compareTo(FlowExecutionStatus other) { Status one = Status.match(this.name); Status two = Status.match(other.name); int comparison = one.compareTo(two); if (comparison == 0) { return this.name.compareTo(other.name); } return comparison; }
/** * Create an ordering on {@link FlowExecutionStatus} instances by comparing * their statuses. * * @see Comparable#compareTo(Object) * * @param other instance of {@link FlowExecutionStatus} to compare this instance with. * @return negative, zero or positive as per the contract */ @Override public int compareTo(FlowExecutionStatus other) { Status one = Status.match(this.name); Status two = Status.match(other.name); int comparison = one.compareTo(two); if (comparison == 0) { return this.name.compareTo(other.name); } return comparison; }
/** * Create an ordering on {@link FlowExecutionStatus} instances by comparing * their statuses. * * @see Comparable#compareTo(Object) * * @param other * @return negative, zero or positive as per the contract */ @Override public int compareTo(FlowExecutionStatus other) { Status one = Status.match(this.name); Status two = Status.match(other.name); int comparison = one.compareTo(two); if (comparison == 0) { return this.name.compareTo(other.name); } return comparison; }
/** * Create an ordering on {@link FlowExecutionStatus} instances by comparing * their statuses. * * @see Comparable#compareTo(Object) * * @param other instance of {@link FlowExecutionStatus} to compare this instance with. * @return negative, zero or positive as per the contract */ @Override public int compareTo(FlowExecutionStatus other) { Status one = Status.match(this.name); Status two = Status.match(other.name); int comparison = one.compareTo(two); if (comparison == 0) { return this.name.compareTo(other.name); } return comparison; }