Example usage for java.util.concurrent.atomic AtomicIntegerArray length

List of usage examples for java.util.concurrent.atomic AtomicIntegerArray length

Introduction

In this page you can find the example usage for java.util.concurrent.atomic AtomicIntegerArray length.

Prototype

public final int length() 

Source Link

Document

Returns the length of the array.

Usage

From source file:Main.java

public static void main(String[] argv) throws Exception {
    AtomicIntegerArray atomicIntegerArray = new AtomicIntegerArray(10);

    System.out.println(atomicIntegerArray.length());
}

From source file:Main.java

public static void main(String[] argv) throws Exception {
    AtomicIntegerArray atomicIntegerArray = new AtomicIntegerArray(new int[] { 0, 1, 2, 3 });

    System.out.println(atomicIntegerArray.length());
}

From source file:com.netflix.iep.http.RxHttpTest.java

private AtomicIntegerArray copy(AtomicIntegerArray src) {
    AtomicIntegerArray dst = new AtomicIntegerArray(src.length());
    for (int i = 0; i < src.length(); ++i) {
        dst.set(i, src.get(i));/* w w  w  .j a  v a  2 s .  c  o m*/
    }
    return dst;
}

From source file:com.netflix.iep.http.RxHttpTest.java

private void assertEquals(AtomicIntegerArray expected, AtomicIntegerArray actual) {
    for (int i = 0; i < expected.length(); ++i) {
        final String prefix = "count(" + i + ")=";
        Assert.assertEquals(prefix + expected.get(i), prefix + actual.get(i));
    }//from   w  ww . j  a v a2  s .  c  o  m
}