KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > internal > databinding > provisional > observable > mapping > AbstractObservableMultiMapping


1 /*******************************************************************************
2  * Copyright (c) 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  ******************************************************************************/

11
12 package org.eclipse.jface.internal.databinding.provisional.observable.mapping;
13
14
15 import org.eclipse.jface.internal.databinding.provisional.observable.ObservableTracker;
16
17 /**
18  * @since 1.0
19  *
20  */

21 public abstract class AbstractObservableMultiMapping extends BaseObservableMapping
22         implements IObservableMultiMapping {
23
24     final public Object JavaDoc[] getMappingValues(Object JavaDoc element, int[] indices) {
25         ObservableTracker.getterCalled(this);
26         return doGetMappingValues(element, indices);
27     }
28     
29     public void setMappingValues(Object JavaDoc element, int[] indices, Object JavaDoc[] values) {
30         throw new UnsupportedOperationException JavaDoc();
31     }
32
33     /**
34      * @param indices
35      * @return the value of this mapping for the given element
36      */

37     abstract protected Object JavaDoc[] doGetMappingValues(Object JavaDoc element, int[] indices);
38
39     public boolean isStale() {
40         return false;
41     }
42     
43     public void dispose() {
44         mappingChangeListeners = null;
45         super.dispose();
46     }
47 }
48
Popular Tags