public Buffer create(int level){
  if (!canCreate()) {
    return null;
  }
  Buffer buffer=new Buffer(bufferSize,level,randomGenerator);
  List<Buffer> bufferList=bufferMap.get(level);
  if (bufferList == null) {
    bufferList=new ArrayList<Buffer>();
    bufferMap.put(level,bufferList);
  }
  bufferList.add(buffer);
  count++;
  if (level > maxLevel) {
    maxLevel=level;
  }
  return buffer;
}

public Buffer create ( int level ) { if ( ! canCreate ( ) ) { return null ; } Buffer buffer = new Buffer ( bufferSize , level , randomGenerator ) ; List < Buffer > bufferList = bufferMap . get ( level ) ; if ( bufferList == null ) { bufferList = new ArrayList < Buffer > ( ) ; bufferMap . put ( level , bufferList ) ; } bufferList . add ( buffer ) ; count ++ ; if ( level > maxLevel ) { maxLevel = level ; } return buffer ; }
tries to create a buffer with the given level . < p > if there is capacity to create a new buffer ( i . e . , fewer than count have been created ) , a new buffer is created with the given level , registered and returned . if capacity has been reached , null is returned .
