/** * Sets the maximum amount of space that the cache can store * * @param limit Number of units of cache space */ public void setSpaceLimit(int limit) { if (limit < this.spaceLimit) { makeSpace(this.spaceLimit - limit); } this.spaceLimit = limit; }
/** * Sets the maximum amount of space that the cache can store * * @param limit Number of units of cache space */ public void setSpaceLimit(int limit) { if (limit < this.spaceLimit) { makeSpace(this.spaceLimit - limit); } this.spaceLimit = limit; } /**
/** * Sets the maximum amount of space that the cache can store * * @param limit Number of units of cache space */ public void setSpaceLimit(int limit) { if (limit < this.spaceLimit) { makeSpace(this.spaceLimit - limit); } this.spaceLimit = limit; } /**
/** * Sets the maximum amount of space that the cache can store * * @param limit Number of units of cache space */ public void setSpaceLimit(int limit) { if (limit < this.spaceLimit) { makeSpace(this.spaceLimit - limit); } this.spaceLimit = limit; } /**
/** * Sets the maximum amount of space that the cache can store * * @param limit Number of units of cache space */ public void setSpaceLimit(int limit) { if (limit < this.spaceLimit) { makeSpace(this.spaceLimit - limit); } this.spaceLimit = limit; } /**
/** * Sets the maximum amount of space that the cache can store * * @param limit Number of units of cache space */ public void setSpaceLimit(int limit) { if (limit < this.spaceLimit) { makeSpace(this.spaceLimit - limit); } this.spaceLimit = limit; } /**
/** * Sets the maximum amount of space that the cache can store * * @param limit Number of units of cache space */ public void setSpaceLimit(int limit) { if (limit < this.spaceLimit) { makeSpace(this.spaceLimit - limit); } this.spaceLimit = limit; } /**
if (makeSpace(newSpace)) { privateAdd (key, value, newSpace);
if (makeSpace(newSpace)) { privateAdd (key, value, newSpace);
if (makeSpace(newSpace)) { privateAdd (key, value, newSpace);
if (makeSpace(newSpace)) { privateAdd (key, value, newSpace);
if (makeSpace(newSpace)) { privateAdd (key, value, newSpace);
if (makeSpace(newSpace)) { privateAdd (key, value, newSpace);
if (makeSpace(newSpace)) { privateAdd (key, value, newSpace);