class AttributePartitionImpl extends PartitionImpl {

    protected final WeakReference<Column> column;

    public AttributePartitionImpl(Column column) {
        super();
        this.column = new WeakReference<>(column);
    }

    @Override
    public Object getValue(Element element, Graph graph) {
        return element.getAttribute(column.get(), graph.getView());
    }

    private Index<Element> getIndex(Graph graph) {
        return graph.getModel().getElementIndex(column.get().getTable(), graph.getView());
    }

    @Override
    public Collection getValues(Graph graph) {
        return getIndex(graph).values(column.get());
    }

    @Override
    public int getElementCount(Graph graph) {
        return getIndex(graph).countElements(column.get());
    }

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

    @Override
    public float percentage(Object value, Graph graph) {
        Index<Element> index = getIndex(graph);
        int count = index.count(column.get(), value);
        return 100f * ((float) count / index.countElements(column.get()));
    }

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

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

    @Override
    public Class getValueType() {
        return getColumn().getTypeClass();
    }

    @Override
    public boolean isValid(Graph graph) {
        Column col = column.get();
        if (col != null && col.getIndex() != -1) {
            return true;
        }
        return false;
    }

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

    @Override
    public int hashCode() {<FILL_FUNCTION_BODY>}

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final AttributePartitionImpl other = (AttributePartitionImpl) obj;
        return this.column == other.column || (this.column != null && this.column.equals(other.column));
    }
}

        int hash = 3;
        hash = 23 * hash + (this.column != null ? this.column.hashCode() : 0);
        return hash;
    
<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