Java Collection Count countOverlappers(Collection distances)

Here you can find the source of countOverlappers(Collection distances)

Description

count Overlappers

License

LGPL

Declaration

private static int countOverlappers(Collection<Integer> distances) 

Method Source Code

//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;
    }
}

Related

  1. count(T x0, T x1, T x2, Collection sentences)
  2. count(V matching, Collection values)
  3. countCollectionsSize(Collection... cols)
  4. countComplement(Collection s1, Collection s2)
  5. countDuplicates(Collection items)