javadocs added

pull/1979/head
Nikita Koksharov 6 years ago
parent de7c115542
commit b48c10a768

@ -99,6 +99,14 @@ public interface RList<V> extends List<V>, RExpirable, RListAsync<V>, RSortable<
*/
void fastRemove(int index);
boolean remove(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
*/
boolean remove(Object element, int count);
}

@ -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);
}

@ -63,20 +63,79 @@ public interface RListReactive<V> extends RCollectionReactive<V>, RSortableReact
Flux<V> iterator(int startIndex);
Mono<Integer> lastIndexOf(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
*/
Mono<Integer> lastIndexOf(Object element);
Mono<Integer> indexOf(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
*/
Mono<Integer> indexOf(Object 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
*/
Mono<Void> add(int index, V element);
Mono<Boolean> addAll(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
*/
Mono<Boolean> addAll(int index, Collection<? extends V> elements);
/**
* Set <code>element</code> at <code>index</code>.
* Works faster than {@link #set(int, Object)} but
* doesn't return previous element.
*
* @param index - index of object
* @param element - object
* @return void
*/
Mono<Void> fastSet(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.
*/
Mono<V> set(int index, V element);
/**
* Get element at <code>index</code>
*
* @param index - index of object
* @return element
*/
Mono<V> get(int index);
/**
* Removes element at <code>index</code>.
*
* @param index - index of object
* @return element or <code>null</code> if element wasn't set.
*/
Mono<V> remove(int index);
/**

@ -62,20 +62,79 @@ public interface RListRx<V> extends RCollectionRx<V>, RSortableRx<List<V>> {
Flowable<V> iterator(int startIndex);
Flowable<Integer> lastIndexOf(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
*/
Flowable<Integer> lastIndexOf(Object element);
Flowable<Integer> indexOf(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
*/
Flowable<Integer> indexOf(Object 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
*/
Flowable<Void> add(int index, V element);
Flowable<Boolean> addAll(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
*/
Flowable<Boolean> addAll(int index, Collection<? extends V> elements);
/**
* Set <code>element</code> at <code>index</code>.
* Works faster than {@link #set(int, Object)} but
* doesn't return previous element.
*
* @param index - index of object
* @param element - object
* @return void
*/
Flowable<Void> fastSet(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.
*/
Flowable<V> set(int index, V element);
/**
* Get element at <code>index</code>
*
* @param index - index of object
* @return element
*/
Flowable<V> get(int index);
/**
* Removes element at <code>index</code>.
*
* @param index - index of object
* @return element or <code>null</code> if element wasn't set.
*/
Flowable<V> remove(int index);
/**

Loading…
Cancel
Save