- java.lang.Object
-
- swim.streamlet.AbstractMapInoutlet<K,V,V,IO,IO>
-
- swim.streamlet.combinator.MemoizeMapCombinator<K,V,IO>
-
- All Implemented Interfaces:
Inlet<IO>,Inoutlet<IO,IO>,MapInlet<K,V,IO>,MapInoutlet<K,V,V,IO,IO>,MapOutlet<K,V,IO>,Outlet<IO>
public class MemoizeMapCombinator<K,V,IO> extends AbstractMapInoutlet<K,V,V,IO,IO>
-
-
Constructor Summary
Constructors Constructor Description MemoizeMapCombinator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsKey(K key)Returnstrueif the current state of thisMapOutletcontains the givenkey; otherwise returnsfalse.IOget()Returns the current state of thisOutlet.Vget(K key)Returns the value assocaited with the givenkeyin the current state of thisMapOutlet, if defined; otherwise returnsnull.Iterator<K>keyIterator()Returns anIteratorover the keys in the current state of thisMapOutlet.MapOutlet<K,V,IO>memoize()protected voidonRecohere(int version)protected voidonRecohereKey(K key, KeyEffect effect, int version)-
Methods inherited from class swim.streamlet.AbstractMapInoutlet
bindInput, bindInput, bindOutput, decohere, decohereInput, decohereInputKey, decohereKey, decohereOutput, decohereOutputKey, didDecohere, didDecohereKey, didRecohere, didRecohereKey, disconnectInputs, disconnectOutputs, input, onDecohere, onDecohereKey, outlet, outputIterator, recohere, recohereInput, recohereInputKey, recohereKey, recohereOutput, recohereOutputKey, unbindInput, unbindOutput, unbindOutputs, willDecohere, willDecohereKey, willRecohere, willRecohereKey
-
-
-
-
Field Detail
-
state
protected IO state
-
cache
protected HashTrieMap<K,V> cache
-
-
Method Detail
-
containsKey
public boolean containsKey(K key)
Description copied from interface:MapOutletReturnstrueif the current state of thisMapOutletcontains the givenkey; otherwise returnsfalse.- Specified by:
containsKeyin interfaceMapOutlet<K,V,IO>- Specified by:
containsKeyin classAbstractMapInoutlet<K,V,V,IO,IO>
-
get
public V get(K key)
Description copied from interface:MapOutletReturns the value assocaited with the givenkeyin the current state of thisMapOutlet, if defined; otherwise returnsnull.
-
get
public IO get()
Description copied from interface:OutletReturns the current state of thisOutlet.
-
keyIterator
public Iterator<K> keyIterator()
Description copied from interface:MapOutletReturns anIteratorover the keys in the current state of thisMapOutlet.- Specified by:
keyIteratorin interfaceMapOutlet<K,V,IO>- Specified by:
keyIteratorin classAbstractMapInoutlet<K,V,V,IO,IO>
-
onRecohereKey
protected void onRecohereKey(K key, KeyEffect effect, int version)
- Overrides:
onRecohereKeyin classAbstractMapInoutlet<K,V,V,IO,IO>
-
onRecohere
protected void onRecohere(int version)
- Overrides:
onRecoherein classAbstractMapInoutlet<K,V,V,IO,IO>
-
-