@Pure
	@SuppressWarnings({ "unchecked", "rawtypes", "static-method" })
	protected int compareSegments(GraphSegment<?, ?> firstSegment, GraphSegment<?, ?> secondSegment) {
		if (firstSegment instanceof Comparable) {
			try {
				return ((Comparable) firstSegment).compareTo(secondSegment);
			} catch (AssertionError e) {
				throw e;
			} catch (Throwable e) {
				//
			}
		}
		return firstSegment.hashCode() - secondSegment.hashCode();
	}
@ Pure @ SuppressWarnings ( { "unchecked" , "rawtypes" , "static-method" } ) protected int compareSegments ( GraphSegment < ? , ? > firstSegment , GraphSegment < ? , ? > secondSegment ) { if ( firstSegment instanceof Comparable ) { try { return ( ( Comparable ) firstSegment ) . compareTo ( secondSegment ) ; } catch ( AssertionError e ) { throw e ; } catch ( Throwable e ) { } } return firstSegment . hashCode ( ) - secondSegment . hashCode ( ) ; }
Compare the two given segments.

@param firstSegment the first segment to compare to the second segment.
@param secondSegment the second segment to compare to the first segment.
@return <code>-1</code> if {@code firstSegment} is lower than {@code secondSegment},
<code>1</code> if {@code firstSegment} is greater than {@code secondSegment},
or <code>0</code> if {@code firstSegment} is equal to {@code secondSegment}.