class SpanImpl extends DataPointImpl implements Span {

	@SuppressWarnings("unchecked")
	@Override
	public <T extends Span> T intersection(T span) {

		if ((!(span.getDate().getMillis() < nextDate.getMillis())) &&
				(!(date.getMillis() < span.getNextDate().getMillis()))) {
			return null;
		}
		DateTime start = null;
		DateTime end = null;
		start = this.date.getMillis() < span.getDate().getMillis() ? span.getDate() : this.date;
		end = this.nextDate.getMillis() < span.getNextDate().getMillis() ? this.nextDate : span.getNextDate();

		return (T) new SpanImpl(span.getPeriod(), start, end);

	}

	public  SpanImpl(Period period, DateTime d, DateTime next);
	public  SpanImpl(SpanImpl other);

}