Esempio n. 1
0
 public List<AudioFile> getAudioFiles() {
   List<AudioFile> result = new ArrayList<AudioFile>();
   result.addAll(files);
   for (String string : folders.keySet()) {
     Folder f = folders.get(string);
     result.addAll(f.getAudioFiles());
   }
   return result;
 }
Esempio n. 2
0
 /**
  * Adds a folder as child of this folder
  *
  * @param f
  */
 public void addFolder(Folder f) {
   if (folders.containsKey(f.getName())) {
     Folder folder = folders.get(f.getName());
     folder.addFoldersOf(f);
   } else {
     folders.put(f.getName(), f);
     f.setParentFolder(this);
   }
 }
Esempio n. 3
0
 /**
  * Adds all children folders of a given folder to this
  *
  * @param f
  */
 private void addFoldersOf(Folder f) {
   folders.putAll(f.getFolders());
 }
Esempio n. 4
0
 /**
  * Removes a folder from this folder
  *
  * @param f
  */
 public void removeFolder(Folder f) {
   folders.remove(f.getName());
 }