Merge pull request #532 from leogtzr/master

Adding initialization-on-demand idiom and noninstantiable class instead of interface constant idiom
This commit is contained in:
Ilkka Seppälä
2017-01-23 08:21:07 +02:00
committed by GitHub
13 changed files with 32 additions and 21 deletions

View File

@ -23,6 +23,7 @@
package com.iluwatar.object.pool;
import java.util.HashSet;
import java.util.Set;
/**
*
@ -30,8 +31,8 @@ import java.util.HashSet;
*/
public abstract class ObjectPool<T> {
private HashSet<T> available = new HashSet<>();
private HashSet<T> inUse = new HashSet<>();
private Set<T> available = new HashSet<>();
private Set<T> inUse = new HashSet<>();
protected abstract T create();