--- /dev/null
+/*
+ * DemosceneMusic - Properties.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.Iterator;
+import java.util.Map;
+import java.util.Map.Entry;
+
+/**
+ * Container for custom properties that can be attached to all data containers.
+ *
+ * @see Base#getProperties()
+ * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
+ */
+public class Properties implements Iterable<Entry<String, String>> {
+
+ /** The properties. */
+ private final Map<String, String> properties = new HashMap<String, String>();
+
+ //
+ // ACCESSORS
+ //
+
+ /**
+ * Returns the value of the property with the given name.
+ *
+ * @param property
+ * The name of the property
+ * @return The value of the property, or {@code null} if the property with
+ * the given name does not exist
+ */
+ public String get(String property) {
+ return properties.get(property);
+ }
+
+ /**
+ * Sets the value of the property with the given name.
+ *
+ * @param property
+ * The name of the property
+ * @param value
+ * The new value of the property
+ * @return These properties
+ */
+ public Properties set(String property, String value) {
+ properties.put(property, value);
+ return this;
+ }
+
+ /**
+ * Removes the property with the given name.
+ *
+ * @param property
+ * The name of the property
+ * @return These properties
+ */
+ public Properties remove(String property) {
+ properties.remove(property);
+ return this;
+ }
+
+ /**
+ * Removes all properties.
+ *
+ * @return These properties
+ */
+ public Properties removeAll() {
+ properties.clear();
+ return this;
+ }
+
+ //
+ // ITERABLE METHODS
+ //
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Iterator<Entry<String, String>> iterator() {
+ return properties.entrySet().iterator();
+ }
+
+}