Here you can find the source of countOverlappers(Collection
private static int countOverlappers(Collection<Integer> distances)
//package com.java2s; //License from project: LGPL import java.util.Collection; public class Main { private static int countOverlappers(Collection<Integer> distances) { int overlappers = 0; for (Integer d : distances) if (d.intValue() == 0) overlappers++;/*from w ww . j av a 2 s. c om*/ return overlappers; } }