//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\ // PLEASE DO NOT EDIT WITHOUT THE EXPLICIT CONSENT OF THE AUTHOR! \\ //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\ using System; using System.Collections; namespace Ilog.Language.Util { /** * This class is meant to be subclassed by the class of objects * identified by an index in an Arraylist collection. * * @version Last modified on Sat May 28 16:06:06 2005 by hak * @author Hassan Aït-Kaci * @copyright © 2000 ILOG, S.A. */ public class ArrayListIndexed : Indexed { /** * Constructs an ArrayListIndexed object with the specified ArrayList * as the reference collection. */ public ArrayListIndexed (ArrayList list) { collection = list; } /** * Constructs an ArrayListIndexed object with the specified ArrayList * as the reference collection and the specified index. */ public ArrayListIndexed (ArrayList list, int index) { collection = list; this.index = index; list.Add(this); } /** * Adds this object to the reference collection and sets its index * appropriately. */ public void Add () { index = collection.Count; collection.Add(this); } } }