Java List Reverse reverse(List a)

Here you can find the source of reverse(List a)

Description

reverse

License

Apache License

Declaration

private static <T> List<T> reverse(List<T> a) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.ArrayList;

import java.util.List;

public class Main {
    private static <T> List<T> reverse(List<T> a) {
        List<T> r = new ArrayList<T>();

        for (int i = a.size() - 1; i >= 0; i--) {
            r.add(a.get(i));//from  w w  w.j  av a 2 s.  co  m
        }
        return r;
    }
}

Related

  1. reverse(List as)
  2. reverse(List list)
  3. reverse(List source)
  4. reverse(List list)
  5. reverse(List list)
  6. reverse(List l)
  7. reverse(List list)
  8. reverse(List list)
  9. reverse(List list)

  10. HOME | Copyright © www.java2s.com 2016