public final int remainingCapacity(){
  return Math.max(0,capacity - cache.size());
}

public final int remainingCapacity ( ) { return Math . max ( 0 , capacity - cache . size ( ) ) ; }
gets the number of entries that can be added to this cache without the need for removing stale entries .
