/*
 * $Id: Dependency.java 220 2007-07-16 10:32:15Z sugimotokenichi $
 * 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);
    }

}