src/main/java/org/jboss/util/collection/SoftValueRef.java
static <K, V> SoftValueRef<K, V> create(K key, V val, ReferenceQueue<V> q)
   {
      if (val == null)
         return null;
      else
         return new SoftValueRef<K, V>(key, val, q);
   }
static <K, V> SoftValueRef<K, V> create(K key, V val, ReferenceQueue<V> q)
   {
      if (val == null)
         return null;
      else
         return new SoftValueRef<K, V>(key, val, q);
   }
static < K , V > SoftValueRef < K , V > create ( K key , V val , ReferenceQueue < V > q ) { if ( val == null ) return null ; else return new SoftValueRef < K , V > ( key , val , q ) ; }
Safely create a new SoftValueRef

@param <K> the key type
@param <V> the value type
@param key the key
@param val the value
@param q   the reference queue
@return the reference or null if the value is null
Safely create a new SoftValueRef