Code example for Collection

Methods: containssize

        final Collection<V> inner_roots = roots; 
        Transformer<V, Double> distribution = new Transformer<V, Double>() 
            public Double transform(V input) 
                if (inner_roots.contains(input)) 
                    return new Double(1.0 / inner_roots.size()); 
                    return 0.0; 
        return distribution; 
     * Returns a Transformer that hub and authority values of 1/<code>roots.size()</code> to each  
     * element of <code>roots</code>. 
     * @param <V> the vertex type 
     * @param roots the vertices to be assigned nonzero scores 
Contextual code suggestions in your IDE  Get Codota for Java