com.maxifier.mxcache.transform.BasicTransforms Maven / Gradle / Ivy
/*
* Copyright (c) 2008-2014 Maxifier Ltd. All Rights Reserved.
*/
package com.maxifier.mxcache.transform;
import com.maxifier.mxcache.PublicAPI;
import java.lang.ref.SoftReference;
import java.lang.ref.WeakReference;
/**
* @author Alexander Kochurov ([email protected])
*/
public final class BasicTransforms {
private BasicTransforms(){}
@PublicAPI
// used in SoftKey
public static SoftReference createSoftReference(T t) {
return new SmartSoftReference(t);
}
@PublicAPI
// used in WeakKey
public static WeakReference createWeakReference(T t) {
return new SmartWeakReference(t);
}
}