
cdc.util.tuples.CTuple Maven / Gradle / Ivy
package cdc.util.tuples;
/**
* Base interface of comparable tuples.
*
* @author Damien Carbonne
*
* @param The tuple type.
*/
public interface CTuple> extends Tuple, Comparable {
@Override
public Comparable> getValue(int index);
public static > int compare(T l,
T r) {
if (l == null) {
if (r == null) {
return 0;
} else {
return -1;
}
} else {
if (r == null) {
return 1;
} else {
return l.compareTo(r);
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy