From 7d48bef70a56d4370856eedab619b1f83ac3d0d0 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Mon, 9 Mar 2020 19:06:11 +0530 Subject: Rename app module to ui Signed-off-by: Harsh Shandilya --- .../java/com/wireguard/util/SortedKeyedList.java | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 ui/src/main/java/com/wireguard/util/SortedKeyedList.java (limited to 'ui/src/main/java/com/wireguard/util/SortedKeyedList.java') diff --git a/ui/src/main/java/com/wireguard/util/SortedKeyedList.java b/ui/src/main/java/com/wireguard/util/SortedKeyedList.java new file mode 100644 index 00000000..b144fc85 --- /dev/null +++ b/ui/src/main/java/com/wireguard/util/SortedKeyedList.java @@ -0,0 +1,31 @@ +/* + * Copyright © 2017-2019 WireGuard LLC. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.wireguard.util; + +import androidx.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(); +} -- cgit v1.2.3-59-g8ed1b