Created
November 4, 2015 23:46
-
-
Save skroll/d35cee8497a1ccc392a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class AbstractFoo<K, V> : kotlin.Map<K, V> { | |
override operator fun get(key: K): V? { | |
println("AbstractFoo") | |
return null | |
} | |
override val size: Int | |
get() = throw UnsupportedOperationException() | |
override fun isEmpty(): Boolean { | |
throw UnsupportedOperationException() | |
} | |
override fun containsKey(key: K): Boolean { | |
throw UnsupportedOperationException() | |
} | |
override fun containsValue(value: V): Boolean { | |
throw UnsupportedOperationException() | |
} | |
override val keys: Set<K> | |
get() = throw UnsupportedOperationException() | |
override val values: Collection<V> | |
get() = throw UnsupportedOperationException() | |
override val entries: Set<Map.Entry<K, V>> | |
get() = throw UnsupportedOperationException() | |
} | |
public class IntFoo<E> : AbstractFoo<Int, E>() { | |
override operator fun get(key: Int): E? { | |
println("IntFoo") | |
return null | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment