All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fluxtion.ext.streaming.api.WrappedList Maven / Gradle / Ivy

There is a newer version: 2.10.50
Show newest version
/*
 * Copyright (c) 2020, V12 Technology Ltd.
 * All rights reserved.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the Server Side Public License, version 1,
 * as published by MongoDB, Inc.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * Server Side Public License for more details.
 *
 * You should have received a copy of the Server Side Public License
 * along with this program.  If not, see 
 * .
 */
package com.fluxtion.ext.streaming.api;

import java.util.List;

/**
 * An ordered based collection of items that can be sorted or queried by position.
 *
 * @author Greg Higgins [email protected]
 * @param 
 */
public interface WrappedList extends WrappedCollection, WrappedList> {

    WrappedList top(int n);

    WrappedList last(int n);

    WrappedList skip(int n);

    WrappedList reverse();
    
    default T get(int index){
        return collection().get(index);
    }

    default List subList(int fromIndex, int toIndex) {
        return collection().subList(fromIndex, toIndex);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy