/************************************************
 * Copyright (c) Shen Li. All rights reserved.  *
 * http://joyaop.sourceforge.net                *
 * -------------------------------------------- *
 * Distributable under LGPL license.            *
 * See terms of license at gnu.org.             *
 ************************************************/
package net.sf.joyaop.demo.rbac.model;

import java.util.HashSet;
import java.util.Set;

/**
 * @author Shen Li
 */
public class ChildImpl implements Child {
    private Set parents = new HashSet();

    public Set getParents() {
        return parents;
    }

    public void setParents(Set parents) {
        this.parents = parents;
    }

    public void addParent(Parent parent) {
        parents.add(parent);
    }

    public void removeParent(Parent parent) {
        parents.remove(parent);
    }

    public boolean hasParent(Parent parent) {
        return parents.contains(parent);
    }
}
