All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.mmm.util.pool.base.AbstractNoPool Maven / Gradle / Ivy

The newest version!
/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0
 * http://www.apache.org/licenses/LICENSE-2.0 */
package net.sf.mmm.util.pool.base;

import net.sf.mmm.util.pool.api.Pool;

/**
 * This is the abstract base implementation of a dummy {@link Pool} that is actually NOT pooling at all. It always
 * creates a fresh instance on {@link #borrow()} and does nothing on {@link #release(Object)}.
 *
 * @param  is the templated type of the elements in the pool.
 *
 * @author Joerg Hohwiller (hohwille at users.sourceforge.net)
 * @since 1.0.0
 */
public abstract class AbstractNoPool implements Pool {

  /**
   * The constructor.
   */
  public AbstractNoPool() {

    super();
  }

  @Override
  public boolean isEmpty() {

    return true;
  }

  @Override
  public void release(E element) {

    // do nothing by default
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy