public int compareTo(GraphEdge that) {
		final int BEFORE = -1;
	    final int EQUAL = 0;
	    final int AFTER = 1;
	    
	    if (this == that) return EQUAL;
	    
	    if (this.target.getCompareToIndex() < that.target.getCompareToIndex()) return BEFORE;
	    if (this.target.getCompareToIndex() > that.target.getCompareToIndex()) return AFTER;
	    
	    if (this.source.getCompareToIndex() < that.source.getCompareToIndex()) return BEFORE;
	    if (this.source.getCompareToIndex() > that.source.getCompareToIndex()) return AFTER;
	    
	    if (this.type < that.type) return BEFORE;
	    if (this.type > that.type) return AFTER;
	    
		return super.compareTo(that);
	}