Added a convenience method, which I swear was not just an excuse to be able to

say reference reference.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2045 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2007-01-31 23:09:12 +00:00
parent faa94de5a9
commit 7006f016b5
@@ -30,6 +30,15 @@ package com.samskivert.util;
*/
public class ExpiringReference<T>
{
/**
* Gets the value from an expiring reference but returns null if the supplied reference
* reference is null.
*/
public static <T> T get (ExpiringReference<T> value)
{
return (value == null) ? null : value.getValue();
}
/**
* Creates an reference to the specified value that will expire in the
* specified number of milliseconds.