Added a brevifying factory method:

ExpiringReference<OMGLongName> ref = ExpiringReference.create(foo, 1000);


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2270 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
samskivert@gmail.com
2008-02-06 21:45:53 +00:00
parent 24f524549b
commit c96bcb7bce
@@ -32,6 +32,14 @@ package com.samskivert.util;
*/
public class ExpiringReference<T>
{
/**
* Creates an expiring reference with the supplied value and expiration time.
*/
public static <T> ExpiringReference<T> create (T value, long expireMillis)
{
return new ExpiringReference<T>(value, expireMillis);
}
/**
* Gets the value from an expiring reference but returns null if the supplied reference
* reference is null.