Package org.jboss.dashboard.profiler.memory

Examples of org.jboss.dashboard.profiler.memory.SizeEstimations


    public int sizeOf() {
        int nrows = getRowCount();
        if (nrows == 0) return 0;

        SizeEstimations sizeEstimator = SizeEstimations.lookup();
        int ncells = nrows * getProperties().length;
        int result = ncells * 4;
        DataProperty[] props = getProperties();
        for (int i = 0; i < props.length; i++) {
            Object firstRowValue = getValueAt(0, i);
            if (firstRowValue instanceof String) {
                for (int j = 0; j < nrows; j++) {
                    String stringValue = (String) getValueAt(j, i);
                    result += sizeEstimator.sizeOfString(stringValue);
                }
            } else {
                int singleValueSize = sizeEstimator.sizeOf(firstRowValue);
                result += nrows * singleValueSize;
            }
        }
        return result;
    }
View Full Code Here


    public int sizeOf() {
        int nrows = getRowCount();
        if (nrows == 0) return 0;

        SizeEstimations sizeEstimator = SizeEstimations.lookup();
        int ncells = nrows * getProperties().length;
        int result = ncells * 4;
        DataProperty[] props = getProperties();
        for (int i = 0; i < props.length; i++) {
            Object firstRowValue = getValueAt(0, i);
            if (firstRowValue instanceof String) {
                for (int j = 0; j < nrows; j++) {
                    String stringValue = (String) getValueAt(j, i);
                    result += sizeEstimator.sizeOfString(stringValue);
                }
            } else {
                int singleValueSize = sizeEstimator.sizeOf(firstRowValue);
                result += nrows * singleValueSize;
            }
        }
        return result;
    }
View Full Code Here

    public int sizeOf() {
        int nrows = getRowCount();
        if (nrows == 0) return 0;

        SizeEstimations sizeEstimator = SizeEstimations.lookup();
        int ncells = nrows * getProperties().length;
        int result = ncells * 4;
        DataProperty[] props = getProperties();
        for (int i = 0; i < props.length; i++) {
            Object firstRowValue = getValueAt(0, i);
            if (firstRowValue instanceof String) {
                for (int j = 0; j < nrows; j++) {
                    String stringValue = (String) getValueAt(j, i);
                    result += sizeEstimator.sizeOfString(stringValue);
                }
            } else {
                int singleValueSize = sizeEstimator.sizeOf(firstRowValue);
                result += nrows * singleValueSize;
            }
        }
        return result;
    }
View Full Code Here

    public int sizeOf() {
        int nrows = getRowCount();
        if (nrows == 0) return 0;

        SizeEstimations sizeEstimator = SizeEstimations.lookup();
        int ncells = nrows * getProperties().length;
        int result = ncells * 4;
        DataProperty[] props = getProperties();
        for (int i = 0; i < props.length; i++) {
            Object firstRowValue = getValueAt(0, i);
            if (firstRowValue instanceof String) {
                for (int j = 0; j < nrows; j++) {
                    String stringValue = (String) getValueAt(j, i);
                    result += sizeEstimator.sizeOfString(stringValue);
                }
            } else {
                int singleValueSize = sizeEstimator.sizeOf(firstRowValue);
                result += nrows * singleValueSize;
            }
        }
        return result;
    }
View Full Code Here

TOP

Related Classes of org.jboss.dashboard.profiler.memory.SizeEstimations

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.