single-method interface

noun
UK /ˈsɪŋɡəl ˈmɛθəd ˈɪntəfeɪs/
US /ˈsɪŋɡəl ˈmɛθəd ˈɪntərfeɪs/

A single-method interface is a computer rule that has just one job for a program to do.

The programmer used a single-method interface so the button knew exactly what to do when clicked.


OTHER MEANINGS

2. In Java, an interface with exactly one abstract method, which can be implemented with a lambda expression.

Runnable is a classic single-method interface in Java.

3. A design pattern where a contract exposes only one operation to keep code simple and focused.

The team chose a single-method interface to avoid bloating the API.

4. A functional interface used to pass behavior as a value in functional programming styles.

He passed a single-method interface to the sorting function to define the order.