diff --git a/src/com/fsck/k9/activity/setup/Prefs.java b/src/com/fsck/k9/activity/setup/Prefs.java index dfbec1167..fc091b1f5 100644 --- a/src/com/fsck/k9/activity/setup/Prefs.java +++ b/src/com/fsck/k9/activity/setup/Prefs.java @@ -5,6 +5,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List; +import java.util.Set; import android.content.Context; import android.content.Intent; @@ -168,7 +169,7 @@ public class Prefs extends K9PreferenceActivity { List entryVector = new ArrayList(Arrays.asList(mLanguage.getEntries())); List entryValueVector = new ArrayList(Arrays.asList(mLanguage.getEntryValues())); String supportedLanguages[] = getResources().getStringArray(R.array.supported_languages); - HashSet supportedLanguageSet = new HashSet(Arrays.asList(supportedLanguages)); + Set supportedLanguageSet = new HashSet(Arrays.asList(supportedLanguages)); for (int i = entryVector.size() - 1; i > -1; --i) { if (!supportedLanguageSet.contains(entryValueVector.get(i))) { entryVector.remove(i); diff --git a/src/com/fsck/k9/controller/MessagingController.java b/src/com/fsck/k9/controller/MessagingController.java index 558a6a12a..63d2afa63 100644 --- a/src/com/fsck/k9/controller/MessagingController.java +++ b/src/com/fsck/k9/controller/MessagingController.java @@ -616,11 +616,11 @@ public class MessagingController implements Runnable { List remoteFolders = store.getPersonalNamespaces(false); LocalStore localStore = account.getLocalStore(); - HashSet remoteFolderNames = new HashSet(); + Set remoteFolderNames = new HashSet(); List foldersToCreate = new LinkedList(); localFolders = localStore.getPersonalNamespaces(false); - HashSet localFolderNames = new HashSet(); + Set localFolderNames = new HashSet(); for (Folder localFolder : localFolders) { localFolderNames.add(localFolder.getName()); } @@ -693,7 +693,7 @@ public class MessagingController implements Runnable { public void searchLocalMessagesSynchronous(final LocalSearch search, final MessagingListener listener) { final AccountStats stats = new AccountStats(); - final HashSet uuidSet = new HashSet(Arrays.asList(search.getAccountUuids())); + final Set uuidSet = new HashSet(Arrays.asList(search.getAccountUuids())); Account[] accounts = Preferences.getPreferences(mApplication.getApplicationContext()).getAccounts(); boolean allAccounts = uuidSet.contains(SearchSpecification.ALL_ACCOUNTS); diff --git a/src/com/fsck/k9/mail/Message.java b/src/com/fsck/k9/mail/Message.java index 70ee13f30..69d65e763 100644 --- a/src/com/fsck/k9/mail/Message.java +++ b/src/com/fsck/k9/mail/Message.java @@ -26,7 +26,7 @@ public abstract class Message implements Part, CompositeBody { protected String mUid; - protected HashSet mFlags = new HashSet(); + protected Set mFlags = new HashSet(); protected Date mInternalDate; diff --git a/src/com/fsck/k9/mail/store/ImapStore.java b/src/com/fsck/k9/mail/store/ImapStore.java index 2c2bb2fef..87a0c2fb4 100644 --- a/src/com/fsck/k9/mail/store/ImapStore.java +++ b/src/com/fsck/k9/mail/store/ImapStore.java @@ -531,7 +531,7 @@ public class ImapStore extends Store { return allFolders; } else { List resultFolders = new LinkedList(); - HashSet subscribedFolderNames = new HashSet(); + Set subscribedFolderNames = new HashSet(); List subscribedFolders = listFolders(connection, true); for (Folder subscribedFolder : subscribedFolders) { subscribedFolderNames.add(subscribedFolder.getName()); @@ -1488,7 +1488,7 @@ public class ImapStore extends Store { * Envelope - UID FETCH ([FLAGS] INTERNALDATE UID RFC822.SIZE FLAGS BODY.PEEK[HEADER.FIELDS (date subject from content-type to cc)]) * */ - LinkedHashSet fetchFields = new LinkedHashSet(); + Set fetchFields = new LinkedHashSet(); fetchFields.add("UID"); if (fp.contains(FetchProfile.Item.FLAGS)) { fetchFields.add("FLAGS"); diff --git a/src/com/fsck/k9/mail/store/Pop3Store.java b/src/com/fsck/k9/mail/store/Pop3Store.java index ab2133001..bdc0ef5bf 100644 --- a/src/com/fsck/k9/mail/store/Pop3Store.java +++ b/src/com/fsck/k9/mail/store/Pop3Store.java @@ -27,6 +27,7 @@ import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Set; public class Pop3Store extends Store { public static final String STORE_TYPE = "POP3"; @@ -628,7 +629,7 @@ public class Pop3Store extends Store { private void indexUids(ArrayList uids) throws MessagingException, IOException { - HashSet unindexedUids = new HashSet(); + Set unindexedUids = new HashSet(); for (String uid : uids) { if (mUidToMsgMap.get(uid) == null) { if (K9.DEBUG && K9.DEBUG_PROTOCOL_POP3) { @@ -801,7 +802,7 @@ public class Pop3Store extends Store { } } } else { - HashSet msgUidIndex = new HashSet(); + Set msgUidIndex = new HashSet(); for (Message message : messages) { msgUidIndex.add(message.getUid()); } diff --git a/src/com/fsck/k9/search/ConditionsTreeNode.java b/src/com/fsck/k9/search/ConditionsTreeNode.java index 1a1be85d7..7730e0725 100644 --- a/src/com/fsck/k9/search/ConditionsTreeNode.java +++ b/src/com/fsck/k9/search/ConditionsTreeNode.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Stack; +import java.util.Set; import android.database.Cursor; import android.os.Parcel; @@ -243,8 +244,8 @@ public class ConditionsTreeNode implements Parcelable { * Get a set of all the leaves in the tree. * @return Set of all the leaves. */ - public HashSet getLeafSet() { - HashSet leafSet = new HashSet(); + public Set getLeafSet() { + Set leafSet = new HashSet(); return getLeafSet(leafSet); } @@ -338,7 +339,7 @@ public class ConditionsTreeNode implements Parcelable { * @param leafSet Leafset that's being built. * @return Set of leaves being completed. */ - private HashSet getLeafSet(HashSet leafSet) { + private Set getLeafSet(Set leafSet) { if (mLeft == null && mRight == null) { // if we ended up in a leaf, add ourself and return leafSet.add(this); diff --git a/src/com/fsck/k9/search/LocalSearch.java b/src/com/fsck/k9/search/LocalSearch.java index 9ee9577e9..e109e50f4 100644 --- a/src/com/fsck/k9/search/LocalSearch.java +++ b/src/com/fsck/k9/search/LocalSearch.java @@ -28,9 +28,9 @@ public class LocalSearch implements SearchSpecification { private boolean mManualSearch = false; // since the uuid isn't in the message table it's not in the tree neither - private HashSet mAccountUuids = new HashSet(); + private Set mAccountUuids = new HashSet(); private ConditionsTreeNode mConditions = null; - private HashSet mLeafSet = new HashSet(); + private Set mLeafSet = new HashSet(); ///////////////////////////////////////////////////////////////