aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app/src/main/java/com/wireguard/android/util/KeyedList.java
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2018-06-19 00:47:48 -0500
committerSamuel Holland <samuel@sholland.org>2018-06-19 21:59:44 -0500
commit4acee49d4b0da6273cd9ffef1573185f955b5774 (patch)
tree3f322d5255209c3d14d50eec30f17e60c3e46101 /app/src/main/java/com/wireguard/android/util/KeyedList.java
parentcrypto: Slightly Java-ify the Curve25519 implementation (diff)
downloadwireguard-android-4acee49d4b0da6273cd9ffef1573185f955b5774.tar.xz
wireguard-android-4acee49d4b0da6273cd9ffef1573185f955b5774.zip
util: Extract non-Android utility interfaces
As part of a refactoring that will likely introduce more custom collection classes, move the non-Android-specific parts outside the com.wireguard.android package. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/src/main/java/com/wireguard/android/util/KeyedList.java')
-rw-r--r--app/src/main/java/com/wireguard/android/util/KeyedList.java29
1 files changed, 0 insertions, 29 deletions
diff --git a/app/src/main/java/com/wireguard/android/util/KeyedList.java b/app/src/main/java/com/wireguard/android/util/KeyedList.java
deleted file mode 100644
index 9518758e..00000000
--- a/app/src/main/java/com/wireguard/android/util/KeyedList.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright © 2018 Samuel Holland <samuel@sholland.org>
- * Copyright © 2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
- * SPDX-License-Identifier: GPL-2.0-or-later
- */
-
-package com.wireguard.android.util;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * A list containing elements that can be looked up by key. A {@code KeyedList} cannot contain
- * {@code null} elements.
- */
-
-public interface KeyedList<K, E extends Keyed<? extends K>> extends List<E> {
- boolean containsAllKeys(Collection<K> keys);
-
- boolean containsKey(K key);
-
- E get(K key);
-
- E getLast(K key);
-
- int indexOfKey(K key);
-
- int lastIndexOfKey(K key);
-}