aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaneren2005 <daneren2005@gmail.com>2013-12-03 16:19:30 -0800
committerdaneren2005 <daneren2005@gmail.com>2013-12-03 16:19:30 -0800
commit6de31db42dcae180bb3e4ba25f4c4b4574542a60 (patch)
treea88bc4ca5806dd0892ff5cafe936dba9eb50f7b7
parent59c4878e5372d7a3862e41a2550c0e2f55534999 (diff)
downloaddsub-6de31db42dcae180bb3e4ba25f4c4b4574542a60.tar.gz
dsub-6de31db42dcae180bb3e4ba25f4c4b4574542a60.tar.bz2
dsub-6de31db42dcae180bb3e4ba25f4c4b4574542a60.zip
Added replaceChildren function
-rw-r--r--src/github/daneren2005/dsub/domain/MusicDirectory.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/domain/MusicDirectory.java b/src/github/daneren2005/dsub/domain/MusicDirectory.java
index 0b9be5fb..24f61311 100644
--- a/src/github/daneren2005/dsub/domain/MusicDirectory.java
+++ b/src/github/daneren2005/dsub/domain/MusicDirectory.java
@@ -36,10 +36,10 @@ public class MusicDirectory implements Serializable {
private String name;
private String id;
private String parent;
- private List<Entry> children = new ArrayList<Entry>();
+ private List<Entry> children;
public MusicDirectory() {
-
+ children = new ArrayList<Entry>();
}
public MusicDirectory(List<Entry> children) {
this.children = children;
@@ -72,6 +72,10 @@ public class MusicDirectory implements Serializable {
public void addChild(Entry child) {
children.add(child);
}
+
+ public void replaceChildren(List<Entry> children) {
+ this.children = children;
+ }
public List<Entry> getChildren() {
return getChildren(true, true);