/** * Walk the graph and call into the "visitor" * * @param root the roots of the objects (a shared graph will only be visited once) * @return the sum of all Visitor#visit returned values */ long walk(Object... root) { return walk(null, root); }
/** * Walk the graph and call into the "visitor" * * @param root the roots of the objects (a shared graph will only be visited once) * @return the sum of all Visitor#visit returned values */ long walk(Object... root) { return walk(null, root); }
/** * Measures the size in memory (heap) of the objects passed in, walking their graph down * Any overlap of the graphs being passed in will be recognized and only measured once * * @param listener A listener to visited objects * @param obj the root objects of the graphs to measure * @return the total size in bytes for these objects * @see #sizeOf(Object) */ public long deepSizeOf(VisitorListener listener, Object... obj) { return walker.walk(listener, obj); }
public long deepSizeOf(Object... obj) { return walker.walk(null, obj); }
/** * Measures the size in memory (heap) of the objects passed in, walking their graph down * Any overlap of the graphs being passed in will be recognized and only measured once * * @param listener A listener to visited objects * @param obj the root objects of the graphs to measure * @return the total size in bytes for these objects * @see #sizeOf(Object) */ public long deepSizeOf(VisitorListener listener, Object... obj) { return walker.walk(listener, obj); }
public long deepSizeOf(Object... obj) { return walker.walk(null, obj); }