diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-03-09 12:01:52 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-03-09 12:19:15 -0600 |
commit | 8e8643122eb5783d4412c8a81fb03cc789c3f77c (patch) | |
tree | 43cc7ea98c33115a7b3bc062104deeb75c580f19 /ui/src/main/java/com/wireguard/util | |
parent | c00a0b12e4bf353a20a520c59961b21374050089 (diff) |
global: get rid of nonnull gradle hack
Hacking things up via gradle is not right, and package-info.java poses
problems with two modules, so instead we just apply it manually to every
class.
Remember to add this to new classes!
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
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(); |