/*
 * $Id: Dependency.java,v 1.1 2006/04/11 16:14:32 sugimotokenichi Exp $
 * Copyright (C) 2006 SUGIMOTO Ken-ichi
 * 作成日: 2006/03/06
 */
package feat2.config;

import java.util.HashSet;

class Dependency {
    /** 依存元のオブジェクト */
    Object obj;
    /** 依存先のオブジェクト */
    private HashSet depends;

    Dependency(Object obj) {
        this.obj = obj;
        depends = new HashSet();
    }

    void addDepend(Object d) {
        if ( d != null )
            depends.add(d);
    }

    int countDepends() {
        return depends.size();
    }

    void removeDepend(Object target) {
        depends.remove(target);
    }

}