Skip to content

Instantly share code, notes, and snippets.

import java.util.List;
sealed interface ListState {}
interface Empty extends ListState { }
interface NonEmpty extends ListState { }
class MyList<ListStatus,E> {
public List<E> getDelegate() {
return delegate;
}