class EdgeTypePartitionImpl extends PartitionImpl {

    private final Class valueType;
    private final Column column;

    public EdgeTypePartitionImpl(Column column, Class valueType) {
        super();
        this.valueType = valueType;
        this.column = column;
    }

    @Override
    public Collection getValues(Graph graph) {
        int[] types = graph.getModel().getEdgeTypes();
        return Arrays.stream(types).filter(t -> graph.getEdgeCount(t) > 0)
            .mapToObj(t -> graph.getModel().getEdgeTypeLabel(t)).collect(
                Collectors.toList());
    }

    @Override
    public Object getValue(Element element, Graph gr) {
        return ((Edge) element).getTypeLabel();
    }

    @Override
    public int getElementCount(Graph graph) {
        return graph.getEdgeCount();
    }

    @Override
    public int count(Object value, Graph graph) {
        return getIndex(graph).count(column, value);
    }

    @Override
    public float percentage(Object value, Graph graph) {<FILL_FUNCTION_BODY>}

    @Override
    public int size(Graph graph) {
        return getIndex(graph).countValues(column);
    }

    private Index<Edge> getIndex(Graph graph) {
        return graph.getModel().getEdgeIndex(graph.getView());
    }

    @Override
    public Column getColumn() {
        return column;
    }

    @Override
    public Class getValueType() {
        return valueType;
    }

    @Override
    public boolean isValid(Graph graph) {
        return graph.getModel().isMultiGraph();
    }

    @Override
    public int getVersion(Graph graph) {
        if (isValid(graph)) {
            return getIndex(graph).getColumnIndex(column).getVersion();
        }
        return 0;
    }
}

        Index<Edge> index = getIndex(graph);
        int count = index.count(column, value);
        return 100f * ((float) count / index.countElements(column));
    
<methods>public java.awt.Color getColor(java.lang.Object) ,public Collection#RAW getSortedValues(Graph) ,public abstract Class#RAW getValueType() ,public abstract int getVersion(Graph) ,public abstract boolean isValid(Graph) ,public void setColor(java.lang.Object, java.awt.Color) ,public void setColors(Graph, java.awt.Color[]) <variables>protected final non-sealed Map<java.lang.Object,java.awt.Color> colorMap