org.simantics.databoard.accessor.impl
Class MapAccessorIterator<K,V>

java.lang.Object
  extended by org.simantics.databoard.accessor.impl.MapAccessorIterator<K,V>
Type Parameters:
K - key class
V - value class

public class MapAccessorIterator<K,V>
extends java.lang.Object

This helper class creates an iterator to MapAccessr

Author:
Toni Kalajainen

Constructor Summary
MapAccessorIterator(MapAccessor map, Binding keyBinding, java.lang.Object from, boolean fromInclusive, java.lang.Object end, boolean endInclusive, ArrayBinding keyCacheBinding, java.lang.Object keyCache, ArrayBinding valueCacheBinding, java.lang.Object valueCache)
          Initialize iterator with a cache.
MapAccessorIterator(MapAccessor map, Binding keyBinding, java.lang.Object from, boolean fromInclusive, java.lang.Object end, boolean endInclusive, Binding valueBinding, int cacheSize)
          Initialize map accessor iterator with a default cache
 
Method Summary
 boolean hasNext()
           
 int index()
           
 K key()
           
 double keyDouble()
           
 boolean next()
           
 V value()
           
 double valueDouble()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapAccessorIterator

public MapAccessorIterator(MapAccessor map,
                           Binding keyBinding,
                           java.lang.Object from,
                           boolean fromInclusive,
                           java.lang.Object end,
                           boolean endInclusive,
                           ArrayBinding keyCacheBinding,
                           java.lang.Object keyCache,
                           ArrayBinding valueCacheBinding,
                           java.lang.Object valueCache)
Initialize iterator with a cache. The cache should already be allocated with some empty elements.

Parameters:
map -
keyBinding -
from -
fromInclusive -
end -
endInclusive -
keyCacheBinding -
keyCache -
valueCacheBinding -
valueCache -

MapAccessorIterator

public MapAccessorIterator(MapAccessor map,
                           Binding keyBinding,
                           java.lang.Object from,
                           boolean fromInclusive,
                           java.lang.Object end,
                           boolean endInclusive,
                           Binding valueBinding,
                           int cacheSize)
                    throws BindingException,
                           AccessorException
Initialize map accessor iterator with a default cache

Parameters:
map -
keyBinding -
from -
fromInclusive -
end -
endInclusive -
valueBinding -
cacheSize -
Throws:
BindingException
AccessorException
Method Detail

hasNext

public boolean hasNext()
                throws AccessorException
Throws:
AccessorException

next

public boolean next()
             throws AccessorException
Throws:
AccessorException

key

public K key()
      throws AccessorException
Throws:
AccessorException

value

public V value()
        throws AccessorException
Throws:
AccessorException

keyDouble

public double keyDouble()
                 throws AccessorException
Throws:
AccessorException

valueDouble

public double valueDouble()
                   throws AccessorException
Throws:
AccessorException

index

public int index()