@Test public void getFolder_shouldReturnSameFolderEachTime() { Pop3Folder folderOne = store.getFolder("TestFolder"); Pop3Folder folderTwo = store.getFolder("TestFolder"); assertSame(folderOne, folderTwo); }
@Override @NonNull public Pop3Folder getFolder(String name) { Pop3Folder folder = mFolders.get(name); if (folder == null) { folder = new Pop3Folder(this, name); mFolders.put(folder.getId(), folder); } return folder; }
Pop3Store extends RemoteStore { @Override @NonNull public Pop3Folder getFolder(String name) { Pop3Folder folder = mFolders.get(name); if (folder == null) { folder = new Pop3Folder(this, name); mFolders.put(folder.getId(), folder); } return folder; } }
Pop3Store extends RemoteStore { @Override @NonNull public Pop3Folder getFolder(String name) { Pop3Folder folder = mFolders.get(name); if (folder == null) { folder = new Pop3Folder(this, name); mFolders.put(folder.getId(), folder); } return folder; } Pop3Store(StoreConfig storeConfig, TrustedSocketFactory socketFactory); }
Pop3Store extends RemoteStore { @Override @NonNull public Pop3Folder getFolder(String name) { Pop3Folder folder = mFolders.get(name); if (folder == null) { folder = new Pop3Folder(this, name); mFolders.put(folder.getId(), folder); } return folder; } Pop3Store(StoreConfig storeConfig, TrustedSocketFactory socketFactory); static ServerSettings decodeUri(String uri); static String createUri(ServerSettings server); @Override @NonNull Pop3Folder getFolder(String name); @Override @NonNull List <Pop3Folder> getFolders(boolean forceListAll); @NonNull @Override List<? extends Folder> getSubFolders(String parentFolderId, boolean forceListAll); @Override void checkSettings(); @Override boolean isSeenFlagSupported(); Pop3Connection createConnection(); }
Pop3Store extends RemoteStore { @Override @NonNull public Pop3Folder getFolder(String name) { Pop3Folder folder = mFolders.get(name); if (folder == null) { folder = new Pop3Folder(this, name); mFolders.put(folder.getId(), folder); } return folder; } Pop3Store(StoreConfig storeConfig, TrustedSocketFactory socketFactory); static ServerSettings decodeUri(String uri); static String createUri(ServerSettings server); @Override @NonNull Pop3Folder getFolder(String name); @Override @NonNull List <Pop3Folder> getFolders(boolean forceListAll); @NonNull @Override List<? extends Folder> getSubFolders(String parentFolderId, boolean forceListAll); @Override void checkSettings(); @Override boolean isSeenFlagSupported(); Pop3Connection createConnection();  }