org.jetbrains.kotlin.util.slicedMap
Class DelegatingSlice<K,V>

java.lang.Object
  extended by org.jetbrains.kotlin.util.slicedMap.DelegatingSlice<K,V>
All Implemented Interfaces:
ReadOnlySlice<K,V>, WritableSlice<K,V>

public class DelegatingSlice<K,V>
extends java.lang.Object
implements WritableSlice<K,V>

Do nothing but dispatching all invokes to internal writable slice.


Constructor Summary
DelegatingSlice(WritableSlice<K,V> delegate)
           
 
Method Summary
 void afterPut(MutableSlicedMap map, K key, V value)
           
 boolean check(K key, V value)
           
 V computeValue(SlicedMap map, K key, V value, boolean valueNotFound)
           
  getKey()
           
 RewritePolicy getRewritePolicy()
           
 boolean isCollective()
           
 ReadOnlySlice<K,V> makeRawValueVersion()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingSlice

public DelegatingSlice(@NotNull
                       WritableSlice<K,V> delegate)
Method Detail

isCollective

public boolean isCollective()
Specified by:
isCollective in interface WritableSlice<K,V>

check

public boolean check(K key,
                     V value)
Specified by:
check in interface WritableSlice<K,V>

afterPut

public void afterPut(MutableSlicedMap map,
                     K key,
                     V value)
Specified by:
afterPut in interface WritableSlice<K,V>

getRewritePolicy

public RewritePolicy getRewritePolicy()
Specified by:
getRewritePolicy in interface WritableSlice<K,V>

getKey

@NotNull
public  getKey()
Specified by:
getKey in interface ReadOnlySlice<K,V>
Specified by:
getKey in interface WritableSlice<K,V>

computeValue

public V computeValue(SlicedMap map,
                      K key,
                      V value,
                      boolean valueNotFound)
Specified by:
computeValue in interface ReadOnlySlice<K,V>

makeRawValueVersion

public ReadOnlySlice<K,V> makeRawValueVersion()
Specified by:
makeRawValueVersion in interface ReadOnlySlice<K,V>
Returns:
a slice that only retrieves the value from the storage and skips any computeValue() calls