
nf.fr.eraasoft.pool.PoolableObjectBase Maven / Gradle / Ivy
The newest version!
package nf.fr.eraasoft.pool;
/**
* Utility class to create a PoolableObject.
* Just implement PoolableObject.make and activate method
* A sample :
* {@code
PoolableObject poolableStringBuilder = new PoolableObjectBase() {
public StringBuilder make() throws PoolException {
return new StringBuilder();
}
public void activate(StringBuilder t) throws PoolException {
t.setLength(0);
}
};
}
* @author eddie
* @see PoolableObject
*
* @param
*/
public abstract class PoolableObjectBase implements PoolableObject {
@Override
public boolean validate(T t) {
return true;
}
@Override
public void destroy(T t) {
}
@Override
public void passivate(T t) {
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy