Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
import android.widget.Filterable;
import android.widget.TextView;

import androidx.annotation.NonNull;

import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map.Entry;

public class LinkedHashMapAdapter<K, V> extends BaseAdapter implements Filterable {
public class LinkedHashMapAdapter<K, V> extends BaseAdapter implements Filterable, Iterable<Entry<K, V>> {

// When set, filter operates on KEY
public static final int FLAG_FILTER_ON_KEY = 0x1;
Expand Down Expand Up @@ -396,6 +399,12 @@ public void setFlags(int flags) {
this.mFlags = flags;
}

@NonNull
@Override
public Iterator<Entry<K, V>> iterator() {
return mMapData.entrySet().iterator();
}

/**
* <p>An Map filter constrains the content of the HashMap adapter with
* a prefix. Each item that does not start with the supplied prefix
Expand Down