org.schoellerfamily.gedbrowser.persistence.mongo.domain.HasAttributes Maven / Gradle / Ivy
package org.schoellerfamily.gedbrowser.persistence.mongo.domain;
import java.util.ArrayList;
import java.util.List;
import org.schoellerfamily.gedbrowser.datamodel.GedObject;
import org.schoellerfamily.gedbrowser.persistence.domain.GedDocument;
/**
* @author Dick Schoeller
*
* @param the associated GedObject subclass
*/
public abstract class HasAttributes
implements GedDocument {
/** */
private final List> attributes =
new ArrayList<>();
/**
* {@inheritDoc}
*/
@Override
public final List> getAttributes() {
return attributes;
}
/**
* {@inheritDoc}
*/
@Override
public final void setAttributes(
final List> attributes) {
this.attributes.clear();
this.attributes.addAll(attributes);
}
/**
* {@inheritDoc}
*/
@Override
public final void addAttribute(final GedDocument> attribute) {
attributes.add(attribute);
}
/**
* {@inheritDoc}
*/
@Override
public final void clearAttributes() {
attributes.clear();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy