How to implement this Java interface in Kotlin?

Viewed 51032

Since Kotlin doesn't have primitives, how could this interface be implemented?

public interface A {
  @NotNull Object get(@NotNull Integer i);
  @NotNull Object get(int i);
}

I cannot change the Java code since it's a compiled class file in a binary library.

5 Answers

add these lines to implement interface in kotlin

class abc : AppCompatActivity(), interface 1, interface 2,
{
override fun get(i: Int?): Any
}
Related