diff --git a/src/java/com/samskivert/util/ExpiringReference.java b/src/java/com/samskivert/util/ExpiringReference.java index 6ffd7b3f..7ae4c6e7 100644 --- a/src/java/com/samskivert/util/ExpiringReference.java +++ b/src/java/com/samskivert/util/ExpiringReference.java @@ -30,6 +30,15 @@ package com.samskivert.util; */ public class ExpiringReference { + /** + * Gets the value from an expiring reference but returns null if the supplied reference + * reference is null. + */ + public static T get (ExpiringReference value) + { + return (value == null) ? null : value.getValue(); + } + /** * Creates an reference to the specified value that will expire in the * specified number of milliseconds.