type on all public methods, otherwise binary compatibility is difficult.
`hash(k: K): Long`