Java List Copy copyList(List source, List destination)

Here you can find the source of copyList(List source, List destination)

Description

copy List

License

Open Source License

Declaration

@SuppressWarnings({ "rawtypes", "unchecked" })
    public static void copyList(List source, List destination) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.List;

public class Main {
    @SuppressWarnings({ "rawtypes", "unchecked" })
    public static void copyList(List source, List destination) {
        destination.clear();/*from w  w w  . j a va2  s  . c  o m*/
        for (Object o : source) {
            destination.add(o);
        }
    }

    public static void copyList(byte[] source, List<Byte> destination) {
        destination.clear();
        for (byte o : source) {
            destination.add(o);
        }
    }
}

Related

  1. copyList(Collection c)
  2. copyList(Collection list)
  3. copyList(final List source, final List destination)
  4. copyList(final List list)
  5. copyList(List objects)
  6. copyList(List src)
  7. copyList(List list)
  8. copyList(List list)
  9. copyList(List list)