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 import java.util.Set; 15 16 import org.eclipse.jface.internal.databinding.provisional.observable.set.IObservableSet; 17 18 /** 19 * @since 1.0 20 * 21 */ 22 public interface IBidirectionalMapping extends IObservableMapping { 23 24 /** 25 * Returns the current set of actual results of the function. Callers can 26 * register listeners on this set to respond to changes in the range of the 27 * function. 28 * 29 * @return the set of possible results of the function. 30 */ 31 public IObservableSet getRange(); 32 33 /** 34 * Returns the set of elements in the domain that map onto the given value 35 * from the range. That is, it returns the set of objects that you can pass 36 * to getFunctionValue that will end up returning the given value. 37 * 38 * @param value 39 * element from the range 40 * @return collection of all elements in the d 41 */ 42 public Set getDomainElementsForValue(Object value); 43 44 } 45