summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java/com/wireguard/util
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/com/wireguard/util')
-rw-r--r--app/src/main/java/com/wireguard/util/KeyedList.java4
-rw-r--r--app/src/main/java/com/wireguard/util/SortedKeyedList.java4
2 files changed, 8 insertions, 0 deletions
diff --git a/app/src/main/java/com/wireguard/util/KeyedList.java b/app/src/main/java/com/wireguard/util/KeyedList.java
index c4ee975e..aab8ff21 100644
--- a/app/src/main/java/com/wireguard/util/KeyedList.java
+++ b/app/src/main/java/com/wireguard/util/KeyedList.java
@@ -5,6 +5,8 @@
package com.wireguard.util;
+import android.support.annotation.Nullable;
+
import java.util.Collection;
import java.util.List;
@@ -18,8 +20,10 @@ public interface KeyedList<K, E extends Keyed<? extends K>> extends List<E> {
boolean containsKey(K key);
+ @Nullable
E get(K key);
+ @Nullable
E getLast(K key);
int indexOfKey(K key);
diff --git a/app/src/main/java/com/wireguard/util/SortedKeyedList.java b/app/src/main/java/com/wireguard/util/SortedKeyedList.java
index f166cd92..a57e9739 100644
--- a/app/src/main/java/com/wireguard/util/SortedKeyedList.java
+++ b/app/src/main/java/com/wireguard/util/SortedKeyedList.java
@@ -5,6 +5,8 @@
package com.wireguard.util;
+import android.support.annotation.Nullable;
+
import java.util.Collection;
import java.util.Comparator;
import java.util.Set;
@@ -17,10 +19,12 @@ import java.util.Set;
public interface SortedKeyedList<K, E extends Keyed<? extends K>> extends KeyedList<K, E> {
Comparator<? super K> comparator();
+ @Nullable
K firstKey();
Set<K> keySet();
+ @Nullable
K lastKey();
Collection<E> values();