123456789101112131415161718192021222324 |
- namespace Invercargill {
- public abstract class Collection<T> : Enumerable<T> {
- public abstract void add(T item);
- public abstract void remove_first_where(PredicateDelegate<T> predicate);
- public abstract void remove_where(PredicateDelegate<T> predicate);
- public virtual void add_all(Enumerable<T> items) {
- items.iterate(i => add(i));
- }
- }
- public abstract class IndexedCollection<T> : Collection<T> {
- public new abstract T @get(int index) throws IndexError;
- public new abstract void @set(int index, T item) throws IndexError;
- public abstract void remove(int index) throws IndexError;
- public abstract int index_of(PredicateDelegate<T> predicate);
- }
-
- }
|