Examples of toArray()


Examples of org.jrdf.graph.Bag.toArray()

        Bag bag = (Bag) obj;

        boolean returnValue = false;
        if (size() == bag.size()) {
            List<ObjectNode> myValues = asList(toArray(new ObjectNode[size()]));
            List<ObjectNode> altValues = asList(bag.toArray(new ObjectNode[size()]));
            returnValue = myValues.equals(altValues);
        }
        return returnValue;
    }
View Full Code Here

Examples of org.jruby.RubyArray.toArray()

     */
    public void testToArray() throws Exception {
        final RubyArray arr = (RubyArray)runtime.evalScriptlet("$h = ['foo','bar']");
        final String val1 = "foo";
        final String val2 = "bar";
        final Object[] outp = arr.toArray();
        assertTrue("toArray should not return null",null != outp);
        assertTrue("toArray should not return empty array",0 != outp.length);
        assertEquals("first element should be \"foo\"",val1,outp[0]);
        assertEquals("second element should be \"bar\"",val2,outp[1]);
        final String[] outp2 = (String[])arr.toArray(new String[0]);
View Full Code Here

Examples of org.json.simple.JSONArray.toArray()

                    JSONArray initScripts = (JSONArray) conf.get(JaggeryCoreConstants.JaggeryConfigParams.INIT_SCRIPTS);
                    if (initScripts != null) {
                        JaggeryContext sharedContext = WebAppManager.sharedJaggeryContext(servletContext);
                        ScriptableObject sharedScope = sharedContext.getScope();

                        Object[] scripts = initScripts.toArray();
                        for (Object script : scripts) {
                            if (!(script instanceof String)) {
                                log.error("Invalid value for initScripts in jaggery.conf : " + script);
                                continue;
                            }
View Full Code Here

Examples of org.jsoup.select.Elements.toArray()

            return;

        int index = 0;
        int returncode = 0;           
           
        for (int i = 0; i < links.toArray().length; i++)
        {
            String link = links.get(i).attr("href").toLowerCase();
            String linkalt = links.get(i).attr("alt");
            String linktitle = links.get(i).attr("title");
            String linktext = links.get(i).text();
View Full Code Here

Examples of org.jvnet.mock_javamail.Mailbox.toArray()

    private Message[] receiveMails(String targetAddress, int count) throws Exception {
        Mailbox mailbox = Mailbox.get(targetAddress);
        assertEquals(count, mailbox.size());

        Message[] msgs = mailbox.toArray(new Message[mailbox.size()]);

        Arrays.sort(msgs, new Comparator<Message>() {
            public int compare(Message o1, Message o2) {
                try {
                    return o1.getSubject().compareTo(o2.getSubject());
View Full Code Here

Examples of org.kie.internal.builder.KnowledgeBuilderErrors.toArray()

        KnowledgeBuilderErrors errors = kbuilder.getErrors();
        if (errors.size() > 0) {
            for (KnowledgeBuilderError error: errors) {
                System.err.println(error);
            }
            throw new IllegalArgumentException("Could not parse knowledge." + errors.toArray());
        }
        KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
        kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
        return kbase;
    }
View Full Code Here

Examples of org.mcarthur.sandy.gwt.event.list.client.FilteredEventList.toArray()

            el.add(new Integer(i));
        }

        assertEquals(10, el.size());
        assertEquals(5, fel.size());
        assertEquals(5, fel.toArray().length);
    }

    public void testFoo() {
        final EventList el = EventLists.eventList();
        final SortedEventList sel = EventLists.sortedEventList(el);
View Full Code Here

Examples of org.mozilla.javascript.NativeArray.toArray()

        if (((ScriptableObject) a).get("method") != "createTable") {
          unitTest.append("(table,");
        }
        final NativeArray args = (NativeArray) ((ScriptableObject) a)
            .get("arguments");
        for (final Object argO : args.toArray()) {
          // test.append("\"");
          StringBuilder arg = toString(argO);
          // if string does not start with a quote
          if (!arg.toString().startsWith("\"")) {
            final String replaceAll = arg.toString().replace("\"",
View Full Code Here

Examples of org.mule.routing.EventGroup.toArray()

        EventGroup eg = new EventGroup(UUID.getUUID());
        eg.addEvent(getTestEvent("foo1"));
        eg.addEvent(getTestEvent("foo2"));

        Object[] array1 = IteratorUtils.toArray(eg.iterator());
        MuleEvent[] array2 = eg.toArray();
        assertTrue(Arrays.equals(array1, array2));
    }

    public void testToString() throws Exception
    {
View Full Code Here

Examples of org.napile.primitive.lists.IntList.toArray()

    }
    finally
    {
      DbUtils.closeQuietly(con, statement, rset);
    }
    LoginServerCommunication.getInstance().sendPacket(new SetAccountInfo(_account, playerSize, deleteChars.toArray()));
  }
}
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.