blob: 1bcd9d342cf5c7eb154b35e1fc674aead6e46a61 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
/*******************************************************************************
* Copyright (c) 2007 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
*
* Contributors:
* Oracle - initial API and implementation
******************************************************************************/
package org.eclipse.jpt.utility.internal.model.value;
import java.util.List;
/**
* Extend ValueModel to allow the adding and
* removing of items in a list value.
* Typically the value returned from #value()
* will be a ListIterator.
*/
public interface ListValueModel
extends ValueModel
{
/**
* Add the item at the specified index in the list value.
*/
void addItem(int index, Object item);
/**
* Add the items at the specified index in the list value.
*/
void addItems(int index, List items);
/**
* Remove the item at the specified index from the list value
* and return it.
*/
Object removeItem(int index);
/**
* Remove the items from the list value, starting at the specified index
* for the specified length. Return a list containing the removed items.
*/
List removeItems(int index, int length);
/**
* Replace the item at the specified index of the list value
* and return the item that was there previously.
*/
Object replaceItem(int index, Object item);
/**
* Replace the items at the specified index of the list value
* and return the items that were there previously.
*/
List replaceItems(int index, List items);
/**
* Return the item at the specified index of the list value.
*/
Object getItem(int index);
/**
* Return the size of the list value.
*/
int size();
}
|