title: Transform array to list
body: <p>I have the following fragment of code:</p>
  
  <pre><code>public void doSomething() {
    float array[] = new float[2];
    array[0] = (float) 0.0;
    array[1] = (float) 1.2;
    someMethod(array);
  }
  
  public void someMethod(Object value) {
     //need to convert value to List&lt;Float&gt;
  }
  </code></pre>
  
  <p>As you can see above I want to convert the value variable which is an array (but passed as an Object) to List.
  I tried the following as suggested here: <a href="https://stackoverflow.com/questions/157944/how-to-create-arraylist-arraylistt-from-array-t-in-java">Create ArrayList from array</a></p>
  
  <pre><code>    new ArrayList&lt;Float&gt; (Arrays.asList(value));
  </code></pre>
  
  <p>however, it does not compile.</p>
  
  <p>Any hints?</p>