001 package net.sf.cpsolver.ifs.util;
002
003 import java.util.Collection;
004 import java.util.Enumeration;
005
006 /**
007 * An extension of {@link Collection} that support elements() method
008 * and few others.
009 *
010 * @version
011 * IFS 1.1 (Iterative Forward Search)<br>
012 * Copyright (C) 2006 Tomáš Müller<br>
013 * <a href="mailto:muller@unitime.org">muller@unitime.org</a><br>
014 * Lazenska 391, 76314 Zlin, Czech Republic<br>
015 * <br>
016 * This library is free software; you can redistribute it and/or
017 * modify it under the terms of the GNU Lesser General Public
018 * License as published by the Free Software Foundation; either
019 * version 2.1 of the License, or (at your option) any later version.
020 * <br><br>
021 * This library is distributed in the hope that it will be useful,
022 * but WITHOUT ANY WARRANTY; without even the implied warranty of
023 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
024 * Lesser General Public License for more details.
025 * <br><br>
026 * You should have received a copy of the GNU Lesser General Public
027 * License along with this library; if not, write to the Free Software
028 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
029 */
030 public interface EnumerableCollection extends Collection {
031 /** Enumerate content */
032 public Enumeration elements();
033 /** Add an element into the collection */
034 public void addElement(Object o);
035 /** Remove element from the collection */
036 public boolean removeElement(Object o);
037 /** First element in the collection */
038 public Object firstElement();
039 }