public static long calculateIndex ( List < AggregationChainLink > links ) { notNull ( links , "Aggregation chain links" ) ; long chainIndex = 0 ; for ( int i = 0 ; i < links . size ( ) ; i ++ ) { if ( links . get ( i ) . isLeft ( ) ) { chainIndex |= 1L << i ; } } chainIndex |= 1L << links . size ( ) ; return chainIndex ; }
Calculates chain index