package org.sipdroid.net.tools;

public class GenericPool<E> extends ObjectPool<Object> {

	public GenericPool(int size) {
		super(size);
		for(int i = 0; i < size; ++i) {
			checkIn(create());
		}
	}

	@Override
	protected E create() {
		return (E)new Object();
	}

	@Override
	protected boolean validate(Object o) {
		// TODO Auto-generated method stub
		return false;
	}

	public E borrowItem() {
		return (E) super.checkOut();
	}
	
	public void returnItem(E o) {
		super.checkIn(o);
	}
	
}
