Examples of toArray()


Examples of javax.print.attribute.PrintJobAttributeSet.toArray()

                if (service != null) {
                    log.info("printer selected : " + service.getName());
                    job = service.createPrintJob();
                    job.addPrintJobListener(this);
                    PrintJobAttributeSet atts = job.getAttributes();
                    Attribute[] arr = atts.toArray();
                    for (int i = 0; i < arr.length; i++) {
                        log.fine("arr[" + i + "]= " + arr[0].getName());
                    }

                    Doc sdoc = new SimpleDoc(this, flavor, null);
View Full Code Here

Examples of javax.print.attribute.PrintRequestAttributeSet.toArray()

  {
    final PrintRequestAttributeSet reportAttributes =
        copyConfiguration(null, report);
    // now, compare that minimal set with the given attribute collection.

    final Attribute[] printAttribs = reportAttributes.toArray();
    boolean invalidConfig = false;
    for (int i = 0; i < printAttribs.length; i++)
    {
      final Attribute attrib = printAttribs[i];
      if (attributes.containsValue(attrib) == false)
View Full Code Here

Examples of javax.print.attribute.PrintServiceAttributeSet.toArray()

        TestUtil.checkServices(services);
       
        for (int i = 0, ii = services.length; i < ii; i++) {
            System.out.println("----" + services[i].getName() + "----");
            as = services[i].getAttributes();
            aa = as.toArray();
            for (int j = 0; j < aa.length; j++) {
                System.out.println(aa[j].getName() + ": " + aa[j].toString());
            }
        }
View Full Code Here

Examples of javax.swing.DefaultListModel.toArray()

        return changed;
    }

    public void addActionListener(ActionListener actionListener) {
        DefaultListModel model = (DefaultListModel) getModel();
        for (Object o : model.toArray()) {
            Entry entry = (Entry) o;
            entry.checkBox.addActionListener(actionListener);
        }
    }
View Full Code Here

Examples of jinngine.math.Matrix3.toArray()

        final Matrix3 m = new Matrix3(
                1., 2., 3.,
                4., 5., 6.,
                7., 8., 9.);
        final double[] d = m.toArray();
        final double[] d2 = m.toArray();
        assertNotSame(d, d2);
        assertMatrixEquals(new double[]{
                    1., 2., 3.,
                    4., 5., 6.,
View Full Code Here

Examples of jinngine.math.Matrix4.toArray()

        final Matrix4 m = new Matrix4(
                1., 2., 3., 4.,
                5., 6., 7., 8.,
                9., 10, 11, 12,
                13, 14, 15, 16);
        final double[] d = m.toArray();
        final double[] d2 = m.toArray();
        assertNotSame(
                d, d2);
        assertMatrixEquals(
                new double[]{
View Full Code Here

Examples of jinngine.math.Vector3.toArray()

    }

    @Test
    public void testToArray01() {
        final Vector3 v = new Vector3(1., 2., 3.);
        final double[] d = v.toArray();
        assertEquals(1., v.x);
        assertEquals(2., v.y);
        assertEquals(3., v.z);
        assertEquals(3, d.length);
        assertEquals(1., d[0]);
View Full Code Here

Examples of jodd.util.buffer.FastByteBuffer.toArray()

      byte[] encrypted = encryptBlock(block, 0);

      fbb.append(encrypted);
    }

    return fbb.toArray();
  }

  /**
   * Decrypts the whole content, block by block.
   */
 
View Full Code Here

Examples of jodd.util.buffer.FastCharBuffer.toArray()

  public String serialize(Object source) {
    FastCharBuffer fastCharBuffer = new FastCharBuffer();

    serialize(source, fastCharBuffer);

    return UnsafeUtil.createString(fastCharBuffer.toArray());
  }

  // ---------------------------------------------------------------- json context

  /**
 
View Full Code Here

Examples of jodd.util.collection.BooleanArrayList.toArray()

      BooleanArrayList booleanArrayList = new BooleanArrayList();
      for (Object element : iterable) {
        boolean convertedValue = convertType(element);
        booleanArrayList.add(convertedValue);
            }
      return booleanArrayList.toArray();
    }

    if (value instanceof CharSequence) {
      String[] strings = StringUtil.splitc(value.toString(), ArrayConverter.NUMBER_DELIMITERS);
      return convertArrayToArray(strings);
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.