Examples of toArray()


Examples of org.apache.commons.collections.Bag.toArray()

   }

   public void testOrdering() {
      Bag bag = setupBag();
      assertEquals("Should get elements in correct order",
                   "A", bag.toArray()[0]);
      assertEquals("Should get elements in correct order",
                   "B", bag.toArray()[1]);
      assertEquals("Should get elements in correct order",
                   "C", bag.toArray()[2]);
      assertEquals("Should get first key",
View Full Code Here

Examples of org.apache.commons.collections.BoundedFifoBuffer.toArray()

        // if we were unable to activate one or more components,
        // throw an exception
        if ( buffer.size() > 0 )
        {
            throw new CompositeException( (Exception[]) buffer.toArray( new Exception[0] ),
                    "unable to instantiate one or more components" );
        }
    }

    private void verifyComponents() throws CyclicDependencyException
View Full Code Here

Examples of org.apache.commons.collections.primitives.ByteCollection.toArray()

        assertEquals(0,proxied.getSizeCount());
        collection.size();
        assertEquals(1,proxied.getSizeCount());

        assertEquals(0,proxied.getToArrayByteArrayCount());
        collection.toArray(new byte[0]);
        assertEquals(1,proxied.getToArrayByteArrayCount());
       
        assertEquals(0,proxied.getToArrayCount());
        collection.toArray();
        assertEquals(1,proxied.getToArrayCount());
View Full Code Here

Examples of org.apache.commons.collections.primitives.CharCollection.toArray()

        assertEquals(0,proxied.getSizeCount());
        collection.size();
        assertEquals(1,proxied.getSizeCount());

        assertEquals(0,proxied.getToArrayCharArrayCount());
        collection.toArray(new char[0]);
        assertEquals(1,proxied.getToArrayCharArrayCount());
       
        assertEquals(0,proxied.getToArrayCount());
        collection.toArray();
        assertEquals(1,proxied.getToArrayCount());
View Full Code Here

Examples of org.apache.commons.collections.primitives.DoubleCollection.toArray()

        assertEquals(0,proxied.getSizeCount());
        collection.size();
        assertEquals(1,proxied.getSizeCount());

        assertEquals(0,proxied.getToArrayDoubleArrayCount());
        collection.toArray(new double[0]);
        assertEquals(1,proxied.getToArrayDoubleArrayCount());
       
        assertEquals(0,proxied.getToArrayCount());
        collection.toArray();
        assertEquals(1,proxied.getToArrayCount());
View Full Code Here

Examples of org.apache.commons.collections.primitives.FloatCollection.toArray()

        assertEquals(0,proxied.getSizeCount());
        collection.size();
        assertEquals(1,proxied.getSizeCount());

        assertEquals(0,proxied.getToArrayFloatArrayCount());
        collection.toArray(new float[0]);
        assertEquals(1,proxied.getToArrayFloatArrayCount());
       
        assertEquals(0,proxied.getToArrayCount());
        collection.toArray();
        assertEquals(1,proxied.getToArrayCount());
View Full Code Here

Examples of org.apache.commons.collections.primitives.IntCollection.toArray()

        assertEquals(0,proxied.getSizeCount());
        collection.size();
        assertEquals(1,proxied.getSizeCount());

        assertEquals(0,proxied.getToArrayIntArrayCount());
        collection.toArray(new int[0]);
        assertEquals(1,proxied.getToArrayIntArrayCount());
       
        assertEquals(0,proxied.getToArrayCount());
        collection.toArray();
        assertEquals(1,proxied.getToArrayCount());
View Full Code Here

Examples of org.apache.commons.collections.primitives.IntList.toArray()

      throw new NullPointerException("unable to index range " + newRange + " length of input " + text.length());
    }

    List<Line> l = new ArrayList<Line>(list.size());

    int[] values = list.toArray(new int[list.size()]);
    int lineStart = 0;
    int lineEnd = 0;

    for (int i = 0; i < values.length; i++) {
      lineStart = values[i];
View Full Code Here

Examples of org.apache.commons.collections.primitives.LongCollection.toArray()

        assertEquals(0,proxied.getSizeCount());
        collection.size();
        assertEquals(1,proxied.getSizeCount());

        assertEquals(0,proxied.getToArrayLongArrayCount());
        collection.toArray(new long[0]);
        assertEquals(1,proxied.getToArrayLongArrayCount());
       
        assertEquals(0,proxied.getToArrayCount());
        collection.toArray();
        assertEquals(1,proxied.getToArrayCount());
View Full Code Here

Examples of org.apache.commons.collections.primitives.ShortCollection.toArray()

        assertEquals(0,proxied.getSizeCount());
        collection.size();
        assertEquals(1,proxied.getSizeCount());

        assertEquals(0,proxied.getToArrayShortArrayCount());
        collection.toArray(new short[0]);
        assertEquals(1,proxied.getToArrayShortArrayCount());
       
        assertEquals(0,proxied.getToArrayCount());
        collection.toArray();
        assertEquals(1,proxied.getToArrayCount());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.