Rename data containers.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 19 Apr 2012 12:44:37 +0000 (14:44 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 19 Apr 2012 12:44:37 +0000 (14:44 +0200)
The containers are no longer abstract and should thus not be named as
such. The write() functionality will move to Writable* interfaces, and the
manager will be able to convert objects into writable objects so that they
can be persisted.

12 files changed:
src/main/java/net/pterodactylus/demoscenemusic/data/AbstractArtist.java [deleted file]
src/main/java/net/pterodactylus/demoscenemusic/data/AbstractBase.java [deleted file]
src/main/java/net/pterodactylus/demoscenemusic/data/AbstractGroup.java [deleted file]
src/main/java/net/pterodactylus/demoscenemusic/data/AbstractParty.java [deleted file]
src/main/java/net/pterodactylus/demoscenemusic/data/AbstractStyle.java [deleted file]
src/main/java/net/pterodactylus/demoscenemusic/data/AbstractTrack.java [deleted file]
src/main/java/net/pterodactylus/demoscenemusic/data/DefaultArtist.java [new file with mode: 0644]
src/main/java/net/pterodactylus/demoscenemusic/data/DefaultBase.java [new file with mode: 0644]
src/main/java/net/pterodactylus/demoscenemusic/data/DefaultGroup.java [new file with mode: 0644]
src/main/java/net/pterodactylus/demoscenemusic/data/DefaultParty.java [new file with mode: 0644]
src/main/java/net/pterodactylus/demoscenemusic/data/DefaultStyle.java [new file with mode: 0644]
src/main/java/net/pterodactylus/demoscenemusic/data/DefaultTrack.java [new file with mode: 0644]

diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/AbstractArtist.java b/src/main/java/net/pterodactylus/demoscenemusic/data/AbstractArtist.java
deleted file mode 100644 (file)
index 8ba69cb..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * DemosceneMusic - Artist.java - Copyright © 2012 David Roden
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-package net.pterodactylus.demoscenemusic.data;
-
-import java.util.Set;
-
-/**
- * TODO
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
- */
-public abstract class AbstractArtist extends AbstractBase implements Artist {
-
-       public AbstractArtist(String id) {
-               super(id);
-       }
-
-       public String name() {
-               return value("name", String.class).get();
-       }
-
-       public Artist name(String name) {
-               value("name", String.class).set(name);
-               return this;
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       @SuppressWarnings("unchecked")
-       public Set<Group> groups() {
-               return value("groups", Set.class).get();
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public Artist groups(Set<Group> groups) {
-               value("groups", Set.class).set(groups);
-               return this;
-       }
-
-}
diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/AbstractBase.java b/src/main/java/net/pterodactylus/demoscenemusic/data/AbstractBase.java
deleted file mode 100644 (file)
index ad5cfd8..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * DemosceneMusic - Base.java - Copyright © 2012 David Roden
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-package net.pterodactylus.demoscenemusic.data;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-
-/**
- * TODO
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
- */
-public abstract class AbstractBase implements Base {
-
-       private final String id;
-
-       private final Map<String, Value<?>> attributes = new HashMap<String, Value<?>>();
-
-       protected AbstractBase(String id) {
-               this.id = id;
-       }
-
-       public String id() {
-               return id;
-       }
-
-       @SuppressWarnings({ "synthetic-access", "unchecked" })
-       protected <T> Value<T> value(String name, Class<T> clazz) {
-               if (!attributes.containsKey(name)) {
-                       attributes.put(name, new Value<T>());
-               }
-               return (Value<T>) attributes.get(name);
-       }
-
-       protected boolean dirty() {
-               for (Value<?> value : attributes.values()) {
-                       if (value.dirty()) {
-                               return true;
-                       }
-               }
-               return false;
-       }
-
-       //
-       // OBJECT METHODS
-       //
-
-       /**
-        * {@inheritDoc}
-        */
-       @Override
-       public int hashCode() {
-               return id().hashCode();
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       @Override
-       public boolean equals(Object obj) {
-               if (!(obj instanceof Base)) {
-                       return false;
-               }
-               return id().equals(((Base) obj).id());
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       @Override
-       public String toString() {
-               StringBuilder stringBuilder = new StringBuilder();
-               stringBuilder.append(getClass().getName());
-               stringBuilder.append('[').append("id=").append(id());
-               for (Entry<String, Value<?>> attributeEntry : attributes.entrySet()) {
-                       stringBuilder.append(',').append(attributeEntry.getKey()).append('=').append(attributeEntry.getValue().get());
-               }
-               stringBuilder.append(']');
-               return stringBuilder.toString();
-       }
-
-       protected static class Value<T> {
-
-               private T original;
-
-               private boolean originalSet;
-
-               private T current;
-
-               public T get() {
-                       return current;
-               }
-
-               public Value<T> set(T value) {
-                       if (!originalSet) {
-                               original = value;
-                               originalSet = true;
-                       }
-                       current = value;
-                       return this;
-               }
-
-               public boolean dirty() {
-                       return (original != null) ? !original.equals(current) : current != null;
-               }
-
-               public Value<T> commit() {
-                       original = current;
-                       return this;
-               }
-
-       }
-
-}
diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/AbstractGroup.java b/src/main/java/net/pterodactylus/demoscenemusic/data/AbstractGroup.java
deleted file mode 100644 (file)
index 1cd53dc..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * DemosceneMusic - AbstractGroup.java - Copyright © 2012 David Roden
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-package net.pterodactylus.demoscenemusic.data;
-
-/**
- * TODO
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
- */
-public abstract class AbstractGroup extends AbstractBase implements Group {
-
-       public AbstractGroup(String id) {
-               super(id);
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public String name() {
-               return value("name", String.class).get();
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public Group name(String name) {
-               value("name", String.class).set(name);
-               return this;
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public String url() {
-               return value("url", String.class).get();
-       }
-
-       /**
-        * {@inheritDoc}
-        */
-       public Group url(String url) {
-               value("url", String.class).set(url);
-               return this;
-       }
-
-}
diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/AbstractParty.java b/src/main/java/net/pterodactylus/demoscenemusic/data/AbstractParty.java
deleted file mode 100644 (file)
index 87fed58..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * DemosceneMusic - AbstractParty.java - Copyright © 2012 David Roden
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-package net.pterodactylus.demoscenemusic.data;
-
-/**
- * TODO
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
- */
-public abstract class AbstractParty extends AbstractBase implements Party {
-
-       public AbstractParty(String id) {
-               super(id);
-       }
-
-       public String name() {
-               return value("name", String.class).get();
-       }
-
-       public AbstractParty name(String name) {
-               value("name", String.class).set(name);
-               return this;
-       }
-
-}
diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/AbstractStyle.java b/src/main/java/net/pterodactylus/demoscenemusic/data/AbstractStyle.java
deleted file mode 100644 (file)
index 2c7c948..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * DemosceneMusic - AbstractStyle.java - Copyright © 2012 David Roden
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-package net.pterodactylus.demoscenemusic.data;
-
-/**
- * TODO
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
- */
-public abstract class AbstractStyle extends AbstractBase implements Style {
-
-       public AbstractStyle(String id) {
-               super(id);
-       }
-
-       public String name() {
-               return value("name", String.class).get();
-       }
-
-       public Style name(String name) {
-               value("name", String.class).set(name);
-               return this;
-       }
-
-}
diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/AbstractTrack.java b/src/main/java/net/pterodactylus/demoscenemusic/data/AbstractTrack.java
deleted file mode 100644 (file)
index 810a528..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * DemosceneMusic - Track.java - Copyright © 2012 David Roden
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-package net.pterodactylus.demoscenemusic.data;
-
-import java.util.List;
-import java.util.Set;
-
-/**
- * TODO
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
- */
-public abstract class AbstractTrack extends AbstractBase implements Track {
-
-       public AbstractTrack(String id) {
-               super(id);
-       }
-
-       public String name() {
-               return value("name", String.class).get();
-       }
-
-       public Track name(String name) {
-               value("name", String.class).set(name);
-               return this;
-       }
-
-       public List<Artist> artists() {
-               return value("artists", List.class).get();
-       }
-
-       public Track artists(List<Artist> artists) {
-               value("artists", List.class).set(artists);
-               return this;
-       }
-
-       public Set<Style> styles() {
-               return value("styles", Set.class).get();
-       }
-
-       public Track styles(Set<? extends Style> styles) {
-               value("styles", Set.class).set(styles);
-               return this;
-       }
-
-}
diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultArtist.java b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultArtist.java
new file mode 100644 (file)
index 0000000..6fa8d43
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * DemosceneMusic - Artist.java - Copyright © 2012 David Roden
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package net.pterodactylus.demoscenemusic.data;
+
+import java.util.Set;
+
+/**
+ * TODO
+ *
+ * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
+ */
+public class DefaultArtist extends DefaultBase implements Artist {
+
+       public DefaultArtist(String id) {
+               super(id);
+       }
+
+       public String name() {
+               return value("name", String.class).get();
+       }
+
+       public Artist name(String name) {
+               value("name", String.class).set(name);
+               return this;
+       }
+
+       /**
+        * {@inheritDoc}
+        */
+       @SuppressWarnings("unchecked")
+       public Set<Group> groups() {
+               return value("groups", Set.class).get();
+       }
+
+       /**
+        * {@inheritDoc}
+        */
+       public Artist groups(Set<Group> groups) {
+               value("groups", Set.class).set(groups);
+               return this;
+       }
+
+}
diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultBase.java b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultBase.java
new file mode 100644 (file)
index 0000000..7de5b5e
--- /dev/null
@@ -0,0 +1,130 @@
+/*
+ * DemosceneMusic - Base.java - Copyright © 2012 David Roden
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package net.pterodactylus.demoscenemusic.data;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+
+/**
+ * TODO
+ *
+ * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
+ */
+public class DefaultBase implements Base {
+
+       private final String id;
+
+       private final Map<String, Value<?>> attributes = new HashMap<String, Value<?>>();
+
+       protected DefaultBase(String id) {
+               this.id = id;
+       }
+
+       public String id() {
+               return id;
+       }
+
+       @SuppressWarnings({ "synthetic-access", "unchecked" })
+       protected <T> Value<T> value(String name, Class<T> clazz) {
+               if (!attributes.containsKey(name)) {
+                       attributes.put(name, new Value<T>());
+               }
+               return (Value<T>) attributes.get(name);
+       }
+
+       protected boolean dirty() {
+               for (Value<?> value : attributes.values()) {
+                       if (value.dirty()) {
+                               return true;
+                       }
+               }
+               return false;
+       }
+
+       //
+       // OBJECT METHODS
+       //
+
+       /**
+        * {@inheritDoc}
+        */
+       @Override
+       public int hashCode() {
+               return id().hashCode();
+       }
+
+       /**
+        * {@inheritDoc}
+        */
+       @Override
+       public boolean equals(Object obj) {
+               if (!(obj instanceof Base)) {
+                       return false;
+               }
+               return id().equals(((Base) obj).id());
+       }
+
+       /**
+        * {@inheritDoc}
+        */
+       @Override
+       public String toString() {
+               StringBuilder stringBuilder = new StringBuilder();
+               stringBuilder.append(getClass().getName());
+               stringBuilder.append('[').append("id=").append(id());
+               for (Entry<String, Value<?>> attributeEntry : attributes.entrySet()) {
+                       stringBuilder.append(',').append(attributeEntry.getKey()).append('=').append(attributeEntry.getValue().get());
+               }
+               stringBuilder.append(']');
+               return stringBuilder.toString();
+       }
+
+       protected static class Value<T> {
+
+               private T original;
+
+               private boolean originalSet;
+
+               private T current;
+
+               public T get() {
+                       return current;
+               }
+
+               public Value<T> set(T value) {
+                       if (!originalSet) {
+                               original = value;
+                               originalSet = true;
+                       }
+                       current = value;
+                       return this;
+               }
+
+               public boolean dirty() {
+                       return (original != null) ? !original.equals(current) : current != null;
+               }
+
+               public Value<T> commit() {
+                       original = current;
+                       return this;
+               }
+
+       }
+
+}
diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultGroup.java b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultGroup.java
new file mode 100644 (file)
index 0000000..08fddf4
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * DemosceneMusic - AbstractGroup.java - Copyright © 2012 David Roden
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package net.pterodactylus.demoscenemusic.data;
+
+/**
+ * TODO
+ *
+ * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
+ */
+public class DefaultGroup extends DefaultBase implements Group {
+
+       public DefaultGroup(String id) {
+               super(id);
+       }
+
+       /**
+        * {@inheritDoc}
+        */
+       public String name() {
+               return value("name", String.class).get();
+       }
+
+       /**
+        * {@inheritDoc}
+        */
+       public Group name(String name) {
+               value("name", String.class).set(name);
+               return this;
+       }
+
+       /**
+        * {@inheritDoc}
+        */
+       public String url() {
+               return value("url", String.class).get();
+       }
+
+       /**
+        * {@inheritDoc}
+        */
+       public Group url(String url) {
+               value("url", String.class).set(url);
+               return this;
+       }
+
+}
diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultParty.java b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultParty.java
new file mode 100644 (file)
index 0000000..353e6bb
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * DemosceneMusic - AbstractParty.java - Copyright © 2012 David Roden
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package net.pterodactylus.demoscenemusic.data;
+
+/**
+ * TODO
+ *
+ * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
+ */
+public class DefaultParty extends DefaultBase implements Party {
+
+       public DefaultParty(String id) {
+               super(id);
+       }
+
+       public String name() {
+               return value("name", String.class).get();
+       }
+
+       public DefaultParty name(String name) {
+               value("name", String.class).set(name);
+               return this;
+       }
+
+}
diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultStyle.java b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultStyle.java
new file mode 100644 (file)
index 0000000..4a0ceec
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * DemosceneMusic - AbstractStyle.java - Copyright © 2012 David Roden
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package net.pterodactylus.demoscenemusic.data;
+
+/**
+ * TODO
+ *
+ * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
+ */
+public class DefaultStyle extends DefaultBase implements Style {
+
+       public DefaultStyle(String id) {
+               super(id);
+       }
+
+       public String name() {
+               return value("name", String.class).get();
+       }
+
+       public Style name(String name) {
+               value("name", String.class).set(name);
+               return this;
+       }
+
+}
diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultTrack.java b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultTrack.java
new file mode 100644 (file)
index 0000000..a470c30
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * DemosceneMusic - Track.java - Copyright © 2012 David Roden
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package net.pterodactylus.demoscenemusic.data;
+
+import java.util.List;
+import java.util.Set;
+
+/**
+ * TODO
+ *
+ * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
+ */
+public class DefaultTrack extends DefaultBase implements Track {
+
+       public DefaultTrack(String id) {
+               super(id);
+       }
+
+       public String name() {
+               return value("name", String.class).get();
+       }
+
+       public Track name(String name) {
+               value("name", String.class).set(name);
+               return this;
+       }
+
+       public List<Artist> artists() {
+               return value("artists", List.class).get();
+       }
+
+       public Track artists(List<Artist> artists) {
+               value("artists", List.class).set(artists);
+               return this;
+       }
+
+       public Set<Style> styles() {
+               return value("styles", Set.class).get();
+       }
+
+       public Track styles(Set<? extends Style> styles) {
+               value("styles", Set.class).set(styles);
+               return this;
+       }
+
+}