Java List Sub List subList(List list, int fromIndex, int toIndex)

Here you can find the source of subList(List list, int fromIndex, int toIndex)

Description

sub List

License

Apache License

Declaration

public static List<?> subList(List<?> list, int fromIndex, int toIndex) 

Method Source Code

//package com.java2s;
/**/*w  w w  .  ja  v a  2s.c o m*/
 * Copyright 2008 The University of North Carolina at Chapel Hill
 *
 * 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.
 */

import java.util.List;

public class Main {
    public static List<?> subList(List<?> list, int fromIndex, int toIndex) {
        return list.subList(fromIndex, toIndex);
    }
}

Related

  1. subList(final List list, final int offset, final int amount)
  2. subList(final List list, final int startIndex, final int endIndex)
  3. subList(final List source, final int... indices)
  4. sublist(LinkedHashSet base, int start, int count)
  5. subList(List list, int start, int end)
  6. subList(List list, int page, int size)
  7. subList(List list, int fromIndex)
  8. subList(List list, int skip, int top)
  9. subList(List list, int start, int end)