/** * Get the size of the memory. * @return The size. */ public int size() { int ret = super.size(); for(Iterator it=mappings.keySet().iterator(); it.hasNext();) { Collection c = (Collection)mappings.get(it.next()); ret += c.size(); } return ret; }
/** * Get the size of the memory. * @return The size. */ public int size() { int ret = super.size(); for(Iterator it=mappings.keySet().iterator(); it.hasNext();) { Collection c = (Collection)mappings.get(it.next()); ret += c.size(); } return ret; }
/** * Get the total memory size * @return The memory size. */ public int getTotalMemorySize() { int size = 0; for(Iterator it=memory.values().iterator(); it.hasNext(); ) { Object o = it.next(); if(o instanceof Collection) { size += ((Collection)o).size(); } else if(o instanceof NotMemory) { size += ((NotMemory)o).size(); } else if(o instanceof BetaMemory) { size += ((BetaMemory)o).size(); } } return size; }
/** * Get the total memory size * @return The memory size. */ public int getTotalMemorySize() { int size = 0; for(Iterator it=memory.values().iterator(); it.hasNext(); ) { Object o = it.next(); if(o instanceof Collection) { size += ((Collection)o).size(); } else if(o instanceof NotMemory) { size += ((NotMemory)o).size(); } else if(o instanceof BetaMemory) { size += ((BetaMemory)o).size(); } } return size; }