001 /*
002 * Copyright 2002-2004 the original author or authors.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
005 * use this file except in compliance with the License. You may obtain a copy of
006 * the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
012 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
013 * License for the specific language governing permissions and limitations under
014 * the License.
015 */
016 package org.springframework.binding.value;
017
018 /**
019 * Adds an index aspect to the backing object mostly used by collection type
020 * backing objects. The index can be set to point to a specific item which can
021 * be manipulated using get/setValue().
022 */
023 public interface IndexAdapter extends ValueModel {
024
025 /**
026 * Returns the index of the item which is currently being manipulated.
027 */
028 public int getIndex();
029
030 /**
031 * Set the index of the item to manipulate.
032 */
033 public void setIndex(int index);
034
035 /**
036 * Code to be executed when the index has changed.
037 */
038 public void fireIndexedObjectChanged();
039 }