code: public boolean add(T obj) {
          if(obj == null) return false;
          while(size() >= max_capacity && size() > 0) {
              poll();
          }
          return super.add(obj);
      }
docs: Adds an element at the tail. Removes an object from the head if capacity is exceeded
  @param obj The object to be added