/* * Copyright © 2018 Samuel Holland * SPDX-License-Identifier: Apache-2.0 */ package com.wireguard.util; import android.support.annotation.Nullable; import java.util.Collection; import java.util.Comparator; import java.util.Set; /** * A keyed list where all elements are sorted by the comparator returned by {@code comparator()} * applied to their keys. */ public interface SortedKeyedList> extends KeyedList { Comparator comparator(); @Nullable K firstKey(); Set keySet(); @Nullable K lastKey(); Collection values(); }