Java AtomicReference asList(AtomicReferenceArray a)

Here you can find the source of asList(AtomicReferenceArray a)

Description

as List

License

Open Source License

Declaration

private static <T> List<T> asList(AtomicReferenceArray<T> a) 

Method Source Code


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

import java.util.ArrayList;

import java.util.List;

import java.util.concurrent.atomic.AtomicReferenceArray;

public class Main {
    private static <T> List<T> asList(AtomicReferenceArray<T> a) {
        List<T> list = new ArrayList<T>(a.length());
        for (int i = 0; i < a.length(); i++) {
            list.add(a.get(i));/*from  ww w  .  ja  v  a 2 s.  c om*/
        }
        return list;
    }
}

Related

  1. addParameter(final String key, final String value, final StringBuilder url, final AtomicReference thisSeparator, final String nextSeparator)
  2. addThrowable(AtomicReferenceFieldUpdater field, T instance, Throwable exception)
  3. cancel(Future future, boolean mayInterruptIfRunning)
  4. cancelAll(Future[] futures, boolean mayInterruptIfRunning)
  5. expandSplineRoots(int n)
  6. getDefaultBaseUri()