|
|
|
@ -37,7 +37,7 @@ public interface RListAsync<V> extends RCollectionAsync<V>, RSortableAsync<List<
|
|
|
|
|
RFuture<List<V>> getAsync(int...indexes);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Add <code>element</code> after <code>elementToFind</code>
|
|
|
|
|
* Inserts <code>element</code> after <code>elementToFind</code>
|
|
|
|
|
*
|
|
|
|
|
* @param elementToFind - object to find
|
|
|
|
|
* @param element - object to add
|
|
|
|
@ -46,7 +46,7 @@ public interface RListAsync<V> extends RCollectionAsync<V>, RSortableAsync<List<
|
|
|
|
|
RFuture<Integer> addAfterAsync(V elementToFind, V element);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Add <code>element</code> before <code>elementToFind</code>
|
|
|
|
|
* Inserts <code>element</code> before <code>elementToFind</code>
|
|
|
|
|
*
|
|
|
|
|
* @param elementToFind - object to find
|
|
|
|
|
* @param element - object to add
|
|
|
|
@ -54,13 +54,44 @@ public interface RListAsync<V> extends RCollectionAsync<V>, RSortableAsync<List<
|
|
|
|
|
*/
|
|
|
|
|
RFuture<Integer> addBeforeAsync(V elementToFind, V element);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Inserts <code>element</code> at <code>index</code>.
|
|
|
|
|
* Subsequent elements are shifted.
|
|
|
|
|
*
|
|
|
|
|
* @param index - index number
|
|
|
|
|
* @param element - element to insert
|
|
|
|
|
* @return {@code true} if list was changed
|
|
|
|
|
*/
|
|
|
|
|
RFuture<Boolean> addAsync(int index, V element);
|
|
|
|
|
|
|
|
|
|
RFuture<Boolean> addAllAsync(int index, Collection<? extends V> coll);
|
|
|
|
|
/**
|
|
|
|
|
* Inserts <code>elements</code> at <code>index</code>.
|
|
|
|
|
* Subsequent elements are shifted.
|
|
|
|
|
*
|
|
|
|
|
* @param index - index number
|
|
|
|
|
* @param elements - elements to insert
|
|
|
|
|
* @return {@code true} if list changed
|
|
|
|
|
* or {@code false} if element isn't found
|
|
|
|
|
*/
|
|
|
|
|
RFuture<Boolean> addAllAsync(int index, Collection<? extends V> elements);
|
|
|
|
|
|
|
|
|
|
RFuture<Integer> lastIndexOfAsync(Object o);
|
|
|
|
|
/**
|
|
|
|
|
* Returns last index of <code>element</code> or
|
|
|
|
|
* -1 if element isn't found
|
|
|
|
|
*
|
|
|
|
|
* @param element to find
|
|
|
|
|
* @return index of -1 if element isn't found
|
|
|
|
|
*/
|
|
|
|
|
RFuture<Integer> lastIndexOfAsync(Object element);
|
|
|
|
|
|
|
|
|
|
RFuture<Integer> indexOfAsync(Object o);
|
|
|
|
|
/**
|
|
|
|
|
* Returns last index of <code>element</code> or
|
|
|
|
|
* -1 if element isn't found
|
|
|
|
|
*
|
|
|
|
|
* @param element to find
|
|
|
|
|
* @return index of -1 if element isn't found
|
|
|
|
|
*/
|
|
|
|
|
RFuture<Integer> indexOfAsync(Object element);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set <code>element</code> at <code>index</code>.
|
|
|
|
@ -73,8 +104,21 @@ public interface RListAsync<V> extends RCollectionAsync<V>, RSortableAsync<List<
|
|
|
|
|
*/
|
|
|
|
|
RFuture<Void> fastSetAsync(int index, V element);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set <code>element</code> at <code>index</code> and returns previous element.
|
|
|
|
|
*
|
|
|
|
|
* @param index - index of object
|
|
|
|
|
* @param element - object
|
|
|
|
|
* @return previous element or <code>null</code> if element wasn't set.
|
|
|
|
|
*/
|
|
|
|
|
RFuture<V> setAsync(int index, V element);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get element at <code>index</code>
|
|
|
|
|
*
|
|
|
|
|
* @param index - index of object
|
|
|
|
|
* @return element
|
|
|
|
|
*/
|
|
|
|
|
RFuture<V> getAsync(int index);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -94,10 +138,32 @@ public interface RListAsync<V> extends RCollectionAsync<V>, RSortableAsync<List<
|
|
|
|
|
*/
|
|
|
|
|
RFuture<Void> trimAsync(int fromIndex, int toIndex);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Removes element at <code>index</code>.
|
|
|
|
|
* Works faster than {@link #removeAsync(Object, int)} but
|
|
|
|
|
* doesn't return element.
|
|
|
|
|
*
|
|
|
|
|
* @param index - index of object
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
RFuture<Void> fastRemoveAsync(int index);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Removes element at <code>index</code>.
|
|
|
|
|
*
|
|
|
|
|
* @param index - index of object
|
|
|
|
|
* @return element or <code>null</code> if element wasn't set.
|
|
|
|
|
*/
|
|
|
|
|
RFuture<V> removeAsync(int index);
|
|
|
|
|
|
|
|
|
|
RFuture<Boolean> removeAsync(Object o, int count);
|
|
|
|
|
/**
|
|
|
|
|
* Removes up to <code>count</code> occurrences of <code>element</code>
|
|
|
|
|
*
|
|
|
|
|
* @param element - element to find
|
|
|
|
|
* @param count - amount occurrences
|
|
|
|
|
* @return {@code true} if at least one element removed;
|
|
|
|
|
* or {@code false} if element isn't found
|
|
|
|
|
*/
|
|
|
|
|
RFuture<Boolean> removeAsync(Object element, int count);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|