private static < T extends Storable > int commonOrderingCount ( OrderingList < T > orderingA , OrderingList < T > orderingB ) { int commonCount = Math . min ( orderingA . size ( ) , orderingB . size ( ) ) ; for ( int i = 0 ; i < commonCount ; i ++ ) { if ( ! orderingA . get ( i ) . equals ( orderingB . get ( i ) ) ) { return i ; } } return commonCount ; }
Returns the count of exactly matching properties from the two orderings . The match must be consecutive and start at the first property .