Comment

Comment by throwaway2037

I don't understand these complaints.

Here is a tiny interface that will do what you need:

    @FunctionalInterface
    public interface IPasswordChecker
    {
        bool isValid(String password);
    }
Now you can trivially declare a lambda that implements the interface.

Example:

    const IPasswordChecker passwordChecker = (String password) -> password.length() >= 16;

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton