This commit is contained in:
@@ -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());
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user