visad.data
Class ArrayCache

java.lang.Object
  extended by visad.data.ArrayCache

public class ArrayCache
extends Object

This class is used by the CachingCoordinateSystem to do the actual caching mapping one array to another one

Version:
$Revision: 1.5 $ $Date: 2010-01-05 21:02:43 $

Nested Class Summary
static class ArrayCache.DoubleResult
           
static class ArrayCache.FloatResult
           
 
Constructor Summary
ArrayCache()
          ctor
ArrayCache(boolean enabled)
          ctor
 
Method Summary
 void finalize()
           
 ArrayCache.DoubleResult get(String key, double[][] input)
          Get the converted value for the specified key and input pairs
 ArrayCache.FloatResult get(String key, float[][] input)
          Get the converted value for the specified key and input pairs
 void put(String key, double[][] input, ArrayCache.DoubleResult results)
          Put the converted value for the specified key and input pairs
 void put(String key, float[][] input, ArrayCache.FloatResult results)
          Put the converted value for the specified key and input pairs
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayCache

public ArrayCache()
ctor


ArrayCache

public ArrayCache(boolean enabled)
ctor

Parameters:
enabled - If false then never cache
Method Detail

get

public ArrayCache.FloatResult get(String key,
                                  float[][] input)
Get the converted value for the specified key and input pairs

Parameters:
key - The key (e.g., "toReference", "fromReference")
input - The input
Returns:
value for supplied key

get

public ArrayCache.DoubleResult get(String key,
                                   double[][] input)
Get the converted value for the specified key and input pairs

Parameters:
key - The key (e.g., "toReference", "fromReference")
input - The input
Returns:
value for the supplied key

put

public void put(String key,
                double[][] input,
                ArrayCache.DoubleResult results)
Put the converted value for the specified key and input pairs

Parameters:
key - The key
input - The input array
results - The array to store

put

public void put(String key,
                float[][] input,
                ArrayCache.FloatResult results)
Put the converted value for the specified key and input pairs

Parameters:
key - The key
input - The input array
results - The array to store

finalize

public void finalize()
              throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable