I can not express that in java but BUFFER is SOMETHING<K,V> and the Platform provides the right type.
See for example with Store:
https://github.com/julienledem/summingbird/blob/d88553b193c24b39175bb19e3bab46deb5006997/summingbird-core/src/main/java/com/twitter/summingbird/memory/javaapi/JMemory.java#L38