diff options
Diffstat (limited to 'ui/src/main/java/com/wireguard/util')
-rw-r--r-- | ui/src/main/java/com/wireguard/util/Keyed.java | 3 | ||||
-rw-r--r-- | ui/src/main/java/com/wireguard/util/KeyedList.java | 3 | ||||
-rw-r--r-- | ui/src/main/java/com/wireguard/util/SortedKeyedList.java | 3 |
3 files changed, 9 insertions, 0 deletions
diff --git a/ui/src/main/java/com/wireguard/util/Keyed.java b/ui/src/main/java/com/wireguard/util/Keyed.java index f31a43a2..b4dc40cd 100644 --- a/ui/src/main/java/com/wireguard/util/Keyed.java +++ b/ui/src/main/java/com/wireguard/util/Keyed.java @@ -5,10 +5,13 @@ package com.wireguard.util; +import com.wireguard.util.NonNullForAll; + /** * Interface for objects that have a identifying key of the given type. */ +@NonNullForAll public interface Keyed<K> { K getKey(); } diff --git a/ui/src/main/java/com/wireguard/util/KeyedList.java b/ui/src/main/java/com/wireguard/util/KeyedList.java index c116c1da..e0d06dbb 100644 --- a/ui/src/main/java/com/wireguard/util/KeyedList.java +++ b/ui/src/main/java/com/wireguard/util/KeyedList.java @@ -5,6 +5,8 @@ package com.wireguard.util; +import com.wireguard.util.NonNullForAll; + import androidx.annotation.Nullable; import java.util.Collection; @@ -15,6 +17,7 @@ import java.util.List; * {@code null} elements. */ +@NonNullForAll public interface KeyedList<K, E extends Keyed<? extends K>> extends List<E> { boolean containsAllKeys(Collection<K> keys); diff --git a/ui/src/main/java/com/wireguard/util/SortedKeyedList.java b/ui/src/main/java/com/wireguard/util/SortedKeyedList.java index b144fc85..7afc919e 100644 --- a/ui/src/main/java/com/wireguard/util/SortedKeyedList.java +++ b/ui/src/main/java/com/wireguard/util/SortedKeyedList.java @@ -5,6 +5,8 @@ package com.wireguard.util; +import com.wireguard.util.NonNullForAll; + import androidx.annotation.Nullable; import java.util.Collection; @@ -16,6 +18,7 @@ import java.util.Set; * applied to their keys. */ +@NonNullForAll public interface SortedKeyedList<K, E extends Keyed<? extends K>> extends KeyedList<K, E> { Comparator<? super K> comparator(); |