T
- The type of elements in the list.java.util.Collection<T>
, DistributedDataStructure
, java.lang.Iterable<T>
, java.util.List<T>
, Lockable
, Notifiable
public interface DistributedList<T> extends java.util.List<T>, DistributedDataStructure, Notifiable
Modifier and Type | Method | Description |
---|---|---|
void |
addRange(java.util.Collection<? extends T> items) |
Adds the elements of the specified collection to the end of the List.
|
void |
copyTo(T[] array,
int arrayIndex) |
Copies the List elements to the specified array, starting at the specified index.
|
T |
first() |
Returns the first element of the list.
|
java.util.Collection<T> |
getRange(int start,
int count) |
Returns a list that will contain only the specified range of elements.
|
boolean |
insertAfter(T pivot,
T value) |
Inserts the element in the list after the first occurrence of specified element.
|
void |
insertAtHead(T value) |
Insert the specified value at the head of the list.
|
void |
insertAtTail(T value) |
Insert the specified value at the tail of the list.
|
boolean |
insertBefore(T pivot,
T value) |
Inserts the element in the list before the first occurrence of specified element.
|
T |
last() |
Returns the last element of the list.
|
void |
removeRange(int index,
int count) |
Removes a range of elements from the List.
|
int |
removeRange(java.util.Collection<?> items) |
Removes the elements of the specified collection from the List.
|
void |
trim(int start,
int end) |
Trim an existing list so that it will contain only the specified range of elements.
|
getKey, getWriteThruOptions, setWriteThruOptions
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, of, of, of, of, of, of, of, of, of, of, of, of, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
addChangeListener, removeChangeListener
void trim(int start, int end)
start
- Starting index.end
- Ending index.void copyTo(T[] array, int arrayIndex)
array
- The destination array of the elements copied from List.arrayIndex
- he zero-based index in array at which copying begins.java.util.Collection<T> getRange(int start, int count)
start
- Starting index.count
- Number of items.void addRange(java.util.Collection<? extends T> items)
items
- The collection whose elements should be added to the end of the List.void removeRange(int index, int count)
index
- The zero-based starting index of the range of elements to remove.count
- The number of elements to remove.int removeRange(java.util.Collection<?> items)
items
- The collection whose elements should be removed from the List.boolean insertAfter(T pivot, T value)
pivot
- Element after which value will be inserted.value
- Element to insert in the list.boolean insertBefore(T pivot, T value)
pivot
- Element before which value will be inserted.value
- Element to insert in the list.T first()
T last()
void insertAtHead(T value)
value
- Element to insert in the list.void insertAtTail(T value)
value
- Element to insert in the list.