public abstract class DefaultTemporalPrimitive extends DefaultTemporalObject implements TemporalPrimitive, TemporalOrder, Comparable<TemporalPrimitive> {
public int compareTo(TemporalPrimitive that) {
if (that==null)
throw new IllegalArgumentException("Provided temporal object is null");
final RelativePosition pos= this.relativePosition(that);
if(pos==null)
throw new ClassCastException("The provided object cannot be compared to this one");
if(pos==RelativePosition.BEFORE)
return -1;
if(pos==RelativePosition.AFTER)