org.redisson.api.RListRx Maven / Gradle / Ivy
/**
* Copyright 2018 Nikita Koksharov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.redisson.api;
import java.util.Collection;
import java.util.List;
import io.reactivex.Flowable;
/**
* list functions
*
* @author Nikita Koksharov
*
* @param the type of elements held in this collection
*/
// TODO add sublist support
public interface RListRx extends RCollectionRx, RSortableRx> {
/**
* Loads elements by specified indexes
*
* @param indexes of elements
* @return elements
*/
Flowable> get(int ...indexes);
/**
* Add element
after elementToFind
*
* @param elementToFind - object to find
* @param element - object to add
* @return new list size
*/
Flowable addAfter(V elementToFind, V element);
/**
* Add element
before elementToFind
*
* @param elementToFind - object to find
* @param element - object to add
* @return new list size
*/
Flowable addBefore(V elementToFind, V element);
Flowable descendingIterator();
Flowable descendingIterator(int startIndex);
Flowable iterator(int startIndex);
Flowable lastIndexOf(Object o);
Flowable indexOf(Object o);
Flowable add(int index, V element);
Flowable addAll(int index, Collection extends V> coll);
Flowable fastSet(int index, V element);
Flowable set(int index, V element);
Flowable get(int index);
Flowable remove(int index);
/**
* Read all elements at once
*
* @return list of values
*/
Flowable> readAll();
/**
* Trim list and remains elements only in specified range
* fromIndex
, inclusive, and toIndex
, inclusive.
*
* @param fromIndex - from index
* @param toIndex - to index
* @return void
*/
Flowable trim(int fromIndex, int toIndex);
/**
* Remove object by specified index
*
* @param index - index of object
* @return void
*/
Flowable fastRemove(int index);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy