Class Cache


  • public final class Cache
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.WeakHashMap<java.lang.String,​java.util.WeakHashMap<java.lang.Integer,​boolean[]>> booleanArrayCache  
      protected java.util.WeakHashMap<java.lang.String,​java.util.WeakHashMap<java.lang.Integer,​double[]>> doubleArrayCache  
      protected java.util.WeakHashMap<java.lang.String,​java.util.WeakHashMap<java.lang.Integer,​int[]>> intArrayCache  
      protected java.util.WeakHashMap<java.lang.String,​java.util.WeakHashMap<java.lang.Integer,​java.lang.String[]>> stringArrayCache  
    • Constructor Summary

      Constructors 
      Constructor Description
      Cache()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean[] getCachedBooleanArray​(java.lang.String arrayName, int size)  
      double[] getCachedDoubleArray​(java.lang.String arrayName, int size)  
      int[] getCachedIntArray​(java.lang.String arrayName, int size)  
      java.lang.String[] getCachedStringArray​(java.lang.String arrayName, int size)  
      void release​(java.lang.String arrayName, boolean[] cachedArray)  
      void release​(java.lang.String arrayName, double[] cachedArray)  
      void release​(java.lang.String arrayName, int[] cachedArray)  
      void release​(java.lang.String arrayName, java.lang.String[] cachedArray)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • doubleArrayCache

        protected java.util.WeakHashMap<java.lang.String,​java.util.WeakHashMap<java.lang.Integer,​double[]>> doubleArrayCache
      • intArrayCache

        protected java.util.WeakHashMap<java.lang.String,​java.util.WeakHashMap<java.lang.Integer,​int[]>> intArrayCache
      • booleanArrayCache

        protected java.util.WeakHashMap<java.lang.String,​java.util.WeakHashMap<java.lang.Integer,​boolean[]>> booleanArrayCache
      • stringArrayCache

        protected java.util.WeakHashMap<java.lang.String,​java.util.WeakHashMap<java.lang.Integer,​java.lang.String[]>> stringArrayCache
    • Constructor Detail

      • Cache

        public Cache()
    • Method Detail

      • getCachedDoubleArray

        public double[] getCachedDoubleArray​(java.lang.String arrayName,
                                             int size)
      • release

        public void release​(java.lang.String arrayName,
                            double[] cachedArray)
      • getCachedIntArray

        public int[] getCachedIntArray​(java.lang.String arrayName,
                                       int size)
      • release

        public void release​(java.lang.String arrayName,
                            int[] cachedArray)
      • getCachedBooleanArray

        public boolean[] getCachedBooleanArray​(java.lang.String arrayName,
                                               int size)
      • release

        public void release​(java.lang.String arrayName,
                            boolean[] cachedArray)
      • getCachedStringArray

        public java.lang.String[] getCachedStringArray​(java.lang.String arrayName,
                                                       int size)
      • release

        public void release​(java.lang.String arrayName,
                            java.lang.String[] cachedArray)