3 * Copyright (C) 2007 Jürg Billeter
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 * Jürg Billeter <j@bitron.ch>
24 * Represents a collection of items in a well-defined order.
26 public abstract class Vala
.List
<G
> : Collection
<G
> {
28 * Returns the item at the specified index in this list.
30 * @param index zero-based index of the item to be returned
32 * @return the item at the specified index in the list
34 public abstract G?
get (int index
);
37 * Sets the item at the specified index in this list.
39 * @param index zero-based index of the item to be set
41 public abstract void set (int index
, G item
);
44 * Returns the index of the first occurence of the specified item in
47 * @return the index of the first occurence of the specified item, or
48 * -1 if the item could not be found
50 public abstract int index_of (G item
);
53 * Inserts an item into this list at the specified position.
55 * @param index zero-based index at which item is inserted
56 * @param item item to insert into the list
58 public abstract void insert (int index
, G item
);
61 * Removes the item at the specified index of this list.
63 * @param index zero-based index of the item to be removed
65 public abstract void remove_at (int index
);