All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javafixes.object.SmartComparable Maven / Gradle / Ivy

There is a newer version: 1.4.2.0
Show newest version
package javafixes.object;

public interface SmartComparable extends Comparable {

    default boolean isBefore(T other) {
        return this.compareTo(other) < 0;
    }

    default boolean isBeforeOrEqual(T other) {
        return this.compareTo(other) <= 0;
    }

    default boolean isAfter(T other) {
        return this.compareTo(other) > 0;
    }

    default boolean isAfterOrEqual(T other) {
        return this.compareTo(other) >= 0;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy