private static List<Temporal> generateTemporalSegments(Collection<Long> timestamps, Collection<Long> instances) {
		List<Temporal> segments = new ArrayList<Temporal>();
		if (null == timestamps) return segments;
		if (null == instances) instances = new TreeSet<Long>();
		int c = 0;
		long timeIntervalStart = 0;
		for (Long timestamp : timestamps) {
			if (c++ > 0) segments.add(new Temporal(timeIntervalStart, timestamp));
			if (instances.contains(timestamp)) segments.add(new Temporal(timestamp, timestamp));
			timeIntervalStart = timestamp;
		}
		return segments;
	}