@Test(expectedExceptions = NullPointerException.class, expectedExceptionsMessageRegExp = "Aggregation chain links can not be null") public void testCalculateAggregationHashChainIndex_nullChain_throwsNullPointerException() { calculateIndex(null); }
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; }
AggregationHashChainUtil { 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; } }
AggregationHashChainUtil { 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; } private  AggregationHashChainUtil(); }
AggregationHashChainUtil { 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; } private  AggregationHashChainUtil(); static long calculateIndex(List<AggregationChainLink> links); }
AggregationHashChainUtil { 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; } private  AggregationHashChainUtil(); static long calculateIndex(List<AggregationChainLink> links);  }