@Test public void getTest() { assertEquals(rootFolder, folderView.getFolder("/")); assertEquals(aFolder, folderView.getFolder("a")); assertEquals(aFolder, folderView.getFolder("/a")); assertEquals(aFolder, folderView.getFolder("a/")); assertEquals(aFolder, folderView.getFolder("/a/")); assertEquals(abFolder, folderView.getFolder("a/b")); assertEquals(abFolder, folderView.getFolder("/a/b")); assertEquals(abFolder, folderView.getFolder("a/b/")); assertEquals(abFolder, folderView.getFolder("/a/b/")); }
public Folder getFolder(String folderId) { String normalizedFolderId = Folder.normalizeFolderId(folderId); return folders.get(normalizedFolderId); }
FolderView implements NoteNameListener, FolderListener { public Folder getFolder(String folderId) { String normalizedFolderId = Folder.normalizeFolderId(folderId); return folders.get(normalizedFolderId); } }
FolderView implements NoteNameListener, FolderListener { public Folder getFolder(String folderId) { String normalizedFolderId = Folder.normalizeFolderId(folderId); return folders.get(normalizedFolderId); }  }
FolderView implements NoteNameListener, FolderListener { public Folder getFolder(String folderId) { String normalizedFolderId = Folder.normalizeFolderId(folderId); return folders.get(normalizedFolderId); }  Folder getFolder(String folderId); Folder renameFolder(String oldFolderId, String newFolderId); Folder getFolderOf(Note note); void putNote(Note note); void removeNote(Note note); void clear(); boolean hasFolder(String folderId); boolean hasNote(Note note); int countFolders(); int countNotes(); @Override void onNoteNameChanged(Note note, String oldName); @Override void onFolderRenamed(Folder folder, String oldFolderId); }
FolderView implements NoteNameListener, FolderListener { public Folder getFolder(String folderId) { String normalizedFolderId = Folder.normalizeFolderId(folderId); return folders.get(normalizedFolderId); }  Folder getFolder(String folderId); Folder renameFolder(String oldFolderId, String newFolderId); Folder getFolderOf(Note note); void putNote(Note note); void removeNote(Note note); void clear(); boolean hasFolder(String folderId); boolean hasNote(Note note); int countFolders(); int countNotes(); @Override void onNoteNameChanged(Note note, String oldName); @Override void onFolderRenamed(Folder folder, String oldFolderId);  }