/*
 * NotifyListSupport.java    1.0 97/08/28
 *
 * Copyright (c) 1997 Netscape Communications Corporation
 *
 * Netscape grants you a non-exclusive, royalty free, license to use,
 * modify and redistribute this software in source and binary code form,
 * provided that i) this copyright notice and license appear on all copies of
 * the software; and ii) Licensee does not utilize the software in a manner
 * which is disparaging to Netscape.
 *
 * This software is provided "AS IS," without a warranty of any kind.
 * See the CDK License Agreement for additional terms and conditions.
 * created: 2/97 cls
 */


package netscape.peas;

import java.util.Hashtable;

/**
 * Implementat of the NotifyList interface, to which other
 * classes may delegate.
 */
public class NotifyListSupport implements NotifyList {

    /**
     * default constructor.  don't need delegator (yet)
     */
    public NotifyListSupport() {
    }

    /**
     * Add the given object to this list.
     */
    public void addToVisitedList( Object o ) {
        if ( null == moList ) {
             moList = new Hashtable();
        }
        moList.put( o, o );
    }

    /**
     * Return true if the given object is on this list.
     */
    public boolean isOnVisitedList( Object o ) {
        if ( null == moList ) {
            return false;
        } else {
            return moList.contains( o );
        }
    }


    //-------------------------------------------------------
    // member variables

    private Hashtable moList = null;

}
