Examples of toIntArray()


Examples of com.humaorie.dollar.ArrayWrapper.ByteArrayWrapper.toIntArray()

    @Test
    public void unboxByteArrayToIntArray() {
        Byte[] boxed = new Byte[]{42, 43, 44};
        ByteArrayWrapper arrayWrapper = new ByteArrayWrapper(boxed);
        Assert.assertArrayEquals(new int[]{42, 43, 44}, arrayWrapper.toIntArray());
    }

    @Test
    public void unboxByteArrayToLongArray() {
        Byte[] boxed = new Byte[]{42, 43, 44};
View Full Code Here

Examples of com.humaorie.dollar.ArrayWrapper.CharArrayWrapper.toIntArray()

    @Test
    public void unboxCharacterArrayToIntArray() {
        Character[] boxed = new Character[]{'f', 'o', 'o'};
        CharArrayWrapper arrayWrapper = new CharArrayWrapper(boxed);
        Assert.assertArrayEquals(new int[]{'f', 'o', 'o'}, arrayWrapper.toIntArray());
    }

    @Test
    public void unboxCharacterArrayToLongArray() {
        Character[] boxed = new Character[]{'f', 'o', 'o'};
View Full Code Here

Examples of com.humaorie.dollar.ArrayWrapper.IntegerArrayWrapper.toIntArray()

    @Test
    public void unboxIntegerArray() {
        final Integer[] boxed = {42};
        final int[] unboxed = {42};
        final IntegerArrayWrapper arrayWrapper = new IntegerArrayWrapper(boxed);
        Assert.assertArrayEquals(unboxed, arrayWrapper.toIntArray());
    }

    @Test
    public void unboxIntegerArrayWithNulls() {
        final Integer[] boxed = {null};
View Full Code Here

Examples of com.humaorie.dollar.ArrayWrapper.ShortArrayWrapper.toIntArray()

    @Test
    public void unboxShortArrayToIntArray() {
        final Short[] boxed = {42};
        final int[] unboxed = {42};
        final ShortArrayWrapper arrayWrapper = new ShortArrayWrapper(boxed);
        Assert.assertArrayEquals(unboxed, arrayWrapper.toIntArray());
    }

    @Test
    public void unboxShortArrayToLongArray() {
        final Short[] boxed = {42};
View Full Code Here

Examples of com.jacob.com.SafeArray.toIntArray()

    SafeArray ia = new SafeArray(Variant.VariantInt, 4);
    System.out.println("elem size:" + ia.getElemSize());
    int iack[] = new int[] { 100000, 200000, 300000, 400000 };
    printArray(iack);
    ia.fromIntArray(iack);
    iack = ia.toIntArray();
    printArray(iack);

    int i4[] = new int[4];
    ia.getInts(0, 4, i4, 0);
    printArray(i4);
View Full Code Here

Examples of com.jacob.com.SafeArray.toIntArray()

    ia.getInts(0, 4, i4, 0);
    printArray(i4);

    SafeArray ia2 = new SafeArray(Variant.VariantInt, 4);
    ia2.setInts(0, 4, i4, 0);
    iack = ia2.toIntArray();
    printArray(iack);

    // double
    System.out.println("Double");
    SafeArray da = new SafeArray(Variant.VariantDouble, 4);
View Full Code Here

Examples of com.jacob.com.SafeArray.toIntArray()

    assertEquals("single get failed: ", sourceData[2], saUnderTest
        .getShort(2));

    // test conversion
    int[] extractedFromSafeArrayInt = saUnderTest.toIntArray();
    for (int i = 0; i < extractedFromSafeArray.length; i++) {
      assertEquals("" + i, sourceData[i], extractedFromSafeArrayInt[i]);
    }
    // test conversion
    double[] extractedFromSafeArrayDouble = saUnderTest.toDoubleArray();
View Full Code Here

Examples of com.jacob.com.SafeArray.toIntArray()

   */
  public void testIntSafeArray() {
    int sourceData[] = new int[] { 100000, 200000, 300000 };
    SafeArray saUnderTest = new SafeArray(Variant.VariantVariant, 3);
    saUnderTest.fromIntArray(sourceData);
    int[] extractedFromSafeArray = saUnderTest.toIntArray();
    for (int i = 0; i < extractedFromSafeArray.length; i++) {
      assertEquals("" + i, sourceData[i], extractedFromSafeArray[i]);
    }
    assertEquals("single get failed: ", sourceData[2], saUnderTest
        .getInt(2));
View Full Code Here

Examples of com.samskivert.util.ArrayIntSet.toIntArray()

                Name occ = players[teams[ii][jj]];
                if (occ != null) {
                    set.add(ListUtil.indexOf(plist, occ));
                }
            }
            newTeams[ii] = set.toIntArray();
        }

        return newTeams;
    }
View Full Code Here

Examples of com.sun.xmlsearch.util.IntegerArray.toIntArray()

      case 1:
    return new Query1(env, nColumns, nHits, null, codes.at(0));
 
      default:
    return new Query4(env, nColumns, nHits, null,
          codes.toIntArray());
      }
  }
  else if (context.indexOf("//") != -1) { // ancestor
      StringTokenizer elements = new StringTokenizer(context, " /");
      int ancestor = contextInfo.linkCode(elements.nextToken());
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.