01: /*******************************************************************************
02: * Copyright (c) 2007 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: ******************************************************************************/package org.eclipse.jface.conformance.databinding;
11:
12: import org.eclipse.core.databinding.observable.IObservableCollection;
13: import org.eclipse.core.databinding.observable.Realm;
14:
15: /**
16: * Delegate interface for an IObservableCollection.
17: *
18: * <p>
19: * This interface is not intended to be implemented by clients. Clients should
20: * instead subclass one of the classes that implement this interface. Note that
21: * direct implementers of this interface outside of the framework will be broken
22: * in future releases when methods are added to this interface.
23: * </p>
24: *
25: * @since 1.1
26: */
27: public interface IObservableCollectionContractDelegate extends
28: IObservableContractDelegate {
29: /**
30: * Creates a new observable collection with the provided
31: * <code>elementCount</code>.
32: *
33: * @param realm realm of the collection
34: * @param elementCount
35: * number of elements to initialize the collection with
36: *
37: * @return new observable collection
38: */
39: public IObservableCollection createObservableCollection(
40: Realm realm, int elementCount);
41:
42: /**
43: * Creates a new element of the appropriate type for the provided
44: * <code>collection</code>. This element will be employed to assert the
45: * addition and removal of elements in the collection.
46: *
47: * @param collection
48: * @return valid element for the collection
49: */
50: public Object createElement(IObservableCollection collection);
51:
52: /**
53: * Returns the expected type of the elements in the collection.
54: *
55: * @param collection
56: * @return element type
57: */
58: public Object getElementType(IObservableCollection collection);
59: }
|