Made SoftWrapper fields final.

This commit is contained in:
Martijn van Groningen 2013-02-04 14:47:36 +01:00
parent 8109d13733
commit bc667c378e
1 changed files with 16 additions and 16 deletions

View File

@ -71,7 +71,7 @@ public class CacheRecycler {
// ----- ExtTHashMap -----
private static SoftWrapper<Queue<ExtTHashMap>> hashMap = new SoftWrapper<Queue<ExtTHashMap>>();
private final static SoftWrapper<Queue<ExtTHashMap>> hashMap = new SoftWrapper<Queue<ExtTHashMap>>();
@SuppressWarnings("unchecked")
public static <K, V> ExtTHashMap<K, V> popHashMap() {
@ -98,7 +98,7 @@ public class CacheRecycler {
// ----- THashSet -----
private static SoftWrapper<Queue<THashSet>> hashSet = new SoftWrapper<Queue<THashSet>>();
private final static SoftWrapper<Queue<THashSet>> hashSet = new SoftWrapper<Queue<THashSet>>();
@SuppressWarnings("unchecked")
public static <T> THashSet<T> popHashSet() {
@ -125,7 +125,7 @@ public class CacheRecycler {
// ------ ExtTDoubleObjectHashMap -----
private static SoftWrapper<Queue<ExtTDoubleObjectHashMap>> doubleObjectHashMap = new SoftWrapper<Queue<ExtTDoubleObjectHashMap>>();
private final static SoftWrapper<Queue<ExtTDoubleObjectHashMap>> doubleObjectHashMap = new SoftWrapper<Queue<ExtTDoubleObjectHashMap>>();
@SuppressWarnings("unchecked")
public static <T> ExtTDoubleObjectHashMap<T> popDoubleObjectMap() {
@ -152,7 +152,7 @@ public class CacheRecycler {
// ----- ExtTLongObjectHashMap ----
private static SoftWrapper<Queue<ExtTLongObjectHashMap>> longObjectHashMap = new SoftWrapper<Queue<ExtTLongObjectHashMap>>();
private final static SoftWrapper<Queue<ExtTLongObjectHashMap>> longObjectHashMap = new SoftWrapper<Queue<ExtTLongObjectHashMap>>();
@SuppressWarnings("unchecked")
public static <T> ExtTLongObjectHashMap<T> popLongObjectMap() {
@ -179,7 +179,7 @@ public class CacheRecycler {
// ----- TLongLongHashMap ----
private static SoftWrapper<Queue<TLongLongHashMap>> longLongHashMap = new SoftWrapper<Queue<TLongLongHashMap>>();
private final static SoftWrapper<Queue<TLongLongHashMap>> longLongHashMap = new SoftWrapper<Queue<TLongLongHashMap>>();
public static TLongLongHashMap popLongLongMap() {
Queue<TLongLongHashMap> ref = longLongHashMap.get();
@ -205,7 +205,7 @@ public class CacheRecycler {
// ----- TIntIntHashMap ----
private static SoftWrapper<Queue<TIntIntHashMap>> intIntHashMap = new SoftWrapper<Queue<TIntIntHashMap>>();
private final static SoftWrapper<Queue<TIntIntHashMap>> intIntHashMap = new SoftWrapper<Queue<TIntIntHashMap>>();
public static TIntIntHashMap popIntIntMap() {
@ -233,7 +233,7 @@ public class CacheRecycler {
// ----- TFloatIntHashMap ---
private static SoftWrapper<Queue<TFloatIntHashMap>> floatIntHashMap = new SoftWrapper<Queue<TFloatIntHashMap>>();
private final static SoftWrapper<Queue<TFloatIntHashMap>> floatIntHashMap = new SoftWrapper<Queue<TFloatIntHashMap>>();
public static TFloatIntHashMap popFloatIntMap() {
@ -261,7 +261,7 @@ public class CacheRecycler {
// ----- TDoubleIntHashMap ---
private static SoftWrapper<Queue<TDoubleIntHashMap>> doubleIntHashMap = new SoftWrapper<Queue<TDoubleIntHashMap>>();
private final static SoftWrapper<Queue<TDoubleIntHashMap>> doubleIntHashMap = new SoftWrapper<Queue<TDoubleIntHashMap>>();
public static TDoubleIntHashMap popDoubleIntMap() {
@ -289,7 +289,7 @@ public class CacheRecycler {
// ----- TByteIntHashMap ---
private static SoftWrapper<Queue<TByteIntHashMap>> byteIntHashMap = new SoftWrapper<Queue<TByteIntHashMap>>();
private final static SoftWrapper<Queue<TByteIntHashMap>> byteIntHashMap = new SoftWrapper<Queue<TByteIntHashMap>>();
public static TByteIntHashMap popByteIntMap() {
@ -316,7 +316,7 @@ public class CacheRecycler {
// ----- TShortIntHashMap ---
private static SoftWrapper<Queue<TShortIntHashMap>> shortIntHashMap = new SoftWrapper<Queue<TShortIntHashMap>>();
private final static SoftWrapper<Queue<TShortIntHashMap>> shortIntHashMap = new SoftWrapper<Queue<TShortIntHashMap>>();
public static TShortIntHashMap popShortIntMap() {
@ -344,7 +344,7 @@ public class CacheRecycler {
// ----- TLongIntHashMap ----
private static SoftWrapper<Queue<TLongIntHashMap>> longIntHashMap = new SoftWrapper<Queue<TLongIntHashMap>>();
private final static SoftWrapper<Queue<TLongIntHashMap>> longIntHashMap = new SoftWrapper<Queue<TLongIntHashMap>>();
public static TLongIntHashMap popLongIntMap() {
@ -371,7 +371,7 @@ public class CacheRecycler {
// ------ TObjectIntHashMap -----
private static SoftWrapper<Queue<TObjectIntHashMap>> objectIntHashMap = new SoftWrapper<Queue<TObjectIntHashMap>>();
private final static SoftWrapper<Queue<TObjectIntHashMap>> objectIntHashMap = new SoftWrapper<Queue<TObjectIntHashMap>>();
@SuppressWarnings({"unchecked"})
@ -399,7 +399,7 @@ public class CacheRecycler {
// ------ TIntObjectHashMap -----
private static SoftWrapper<Queue<TIntObjectHashMap>> intObjectHashMap = new SoftWrapper<Queue<TIntObjectHashMap>>();
private final static SoftWrapper<Queue<TIntObjectHashMap>> intObjectHashMap = new SoftWrapper<Queue<TIntObjectHashMap>>();
@SuppressWarnings({"unchecked"})
@ -427,7 +427,7 @@ public class CacheRecycler {
// ------ TObjectFloatHashMap -----
private static SoftWrapper<Queue<TObjectFloatHashMap>> objectFloatHashMap = new SoftWrapper<Queue<TObjectFloatHashMap>>();
private final static SoftWrapper<Queue<TObjectFloatHashMap>> objectFloatHashMap = new SoftWrapper<Queue<TObjectFloatHashMap>>();
@SuppressWarnings({"unchecked"})
public static <T> TObjectFloatHashMap<T> popObjectFloatMap() {
@ -454,7 +454,7 @@ public class CacheRecycler {
// ----- int[] -----
private static SoftWrapper<Queue<Object[]>> objectArray = new SoftWrapper<Queue<Object[]>>();
private final static SoftWrapper<Queue<Object[]>> objectArray = new SoftWrapper<Queue<Object[]>>();
public static Object[] popObjectArray(int size) {
size = size < 100 ? 100 : size;
@ -483,7 +483,7 @@ public class CacheRecycler {
}
private static SoftWrapper<Queue<int[]>> intArray = new SoftWrapper<Queue<int[]>>();
private final static SoftWrapper<Queue<int[]>> intArray = new SoftWrapper<Queue<int[]>>();
public static int[] popIntArray(int size) {
return popIntArray(size, 0);