import java.util.Collection;
/**
- * TODO
+ * Default implementation of a group data container.
*
* @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
public class DefaultGroup extends DefaultBase implements Group {
+ /**
+ * Creates a new group data container.
+ *
+ * @param id
+ * The ID of the group
+ */
public DefaultGroup(String id) {
super(id);
}
+ //
+ // GROUP METHODS
+ //
+
/**
* {@inheritDoc}
*/
return this;
}
+ //
+ // OBJECT METHODS
+ //
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int hashCode() {
+ return getId().hashCode();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean equals(Object object) {
+ if (!(object instanceof Group)) {
+ return false;
+ }
+ return ((Group) object).getId().equals(getId());
+ }
+
}