Java List Create asListBox(double[] a)

Here you can find the source of asListBox(double[] a)

Description

as List Box

License

LGPL

Declaration

public static final List<Double> asListBox(double[] a) 

Method Source Code

//package com.java2s;
/*//w  ww  .j  a v  a2 s.  c o m
This code is licensed under the LGPL v3 or greater with the classpath exception, 
with the following additions and exceptions.  
    
packages cern.* have retained the original cern copyright notices.
    
packages at.mabs.cmdline and at.mabs.util.* 
have the option to be licensed under a BSD(simplified) or Apache 2.0 or greater  license 
in addition to LGPL. 
    
Note that you have permission to replace this license text to any of the permitted licenses. 
    
Main text for LGPL can be found here:
http://www.opensource.org/licenses/lgpl-license.php
    
For BSD:
http://www.opensource.org/licenses/bsd-license.php
    
for Apache:
http://www.opensource.org/licenses/apache2.0.php
    
classpath exception:
http://www.gnu.org/software/classpath/license.html
*/

import java.util.*;

public class Main {
    public static final List<Double> asListBox(double[] a) {
        List<Double> list = new ArrayList<Double>();
        for (int i = 0; i < a.length; i++)
            list.add(a[i]);
        return list;
    }

    public static final List<Integer> asListBox(int[] a) {
        List<Integer> list = new ArrayList<Integer>();
        for (int i = 0; i < a.length; i++)
            list.add(a[i]);
        return list;
    }
}

Related

  1. asList(T... array)
  2. asList(T... elements)
  3. asList(T... items)
  4. asList(T... objs)
  5. asList(T[] array)
  6. asListNoNulls(T... array)
  7. create2DHorizontalIndexList( final int n)
  8. createActMask(ArrayList stateActions, ArrayList beliefActions)
  9. createAndInitializeList(int size, int begin)