This commit is contained in:
kamhung
2015-11-10 16:37:38 +08:00
parent edaa02c9ef
commit eb79f0840b
2 changed files with 23 additions and 1 deletions

View File

@@ -15,7 +15,7 @@ import java.util.logging.*;
* @author zhangjx
* @param <T>
*/
public final class ObjectPool<T> {
public final class ObjectPool<T> implements Supplier<T> {
private static final Logger logger = Logger.getLogger(ObjectPool.class.getSimpleName());

View File

@@ -0,0 +1,22 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.wentch.redkale.util;
/**
* JDK 8 java.util.function.Supplier
*
* @author zhangjx
* @param <T>
*/
public interface Supplier<T> {
/**
* Gets a result.
*
* @return a result
*/
T get();
}