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

src.samples.java.ex.UTA_Sample Maven / Gradle / Ivy

Go to download

An auxiliary findbugs.sourceforge.net plugin for java bug detectors that fall outside the narrow scope of detectors to be packaged with the product itself.

The newest version!
package ex;

import java.util.Iterator;
import java.util.List;

public class UTA_Sample {
    public String[] testList1(List l) {
        String[] data = new String[l.size()];
        for (int i = 0; i < l.size(); i++)
            data[i] = l.get(i);

        return data;
    }

    public Integer[] testList2(List l) {
        int size = l.size();
        Integer[] data = new Integer[size];
        for (int i = 0; i < size; i++)
            data[i] = l.get(i);

        return data;
    }

    public Long[] testList3(List l) {
        Iterator it = l.iterator();
        Long[] data = new Long[l.size()];
        for (int i = 0; i < l.size(); i++)
            data[i] = it.next();

        return data;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy