Examples of peek()


Examples of org.pentaho.commons.connection.IPeekable.peek()

    assertTrue( "result set is not peekable", data instanceof IPeekable );

    IPeekable peekable = (IPeekable) data;

    Object[] row = peekable.peek();
    assertEquals( "Everyday Italian", row[0] );
    assertEquals( "Giada De Laurentiis", row[1] );
    assertEquals( "2005", row[2] );
    assertEquals( "30.00", row[3] );
View Full Code Here

Examples of org.pentaho.platform.plugin.services.connections.javascript.JavaScriptResultSet.peek()

    data.addRow( new Object[] { "a", new Integer( 1 ) } );
    data.addRow( new Object[] { "b", new Integer( 2 ) } );
    data.addRow( new Object[] { "c", new Integer( 3 ) } );

    Object[] row = data.peek();
    assertEquals( "a", row[0] );
    assertEquals( 1, row[1] );

    row = data.peek();
    assertEquals( "a", row[0] );
View Full Code Here

Examples of org.pentaho.reporting.libraries.base.util.FastStack.peek()

        {
          function = null;
        }
        else
        {
          function = (FormulaFunctionElement) functionsStack.peek();
        }
        haveCloseParentheses = false;
      }

      if (node instanceof FormulaFunctionElement)
View Full Code Here

Examples of org.picketlink.identity.federation.web.core.IdentityParticipantStack.peek()

        // asserts if there is a participant for the current session ID
        assertEquals(1, testIdentityParticipantStack.getParticipants(currentSessionID));

        // asserts if the last participant in the stack is the last caller SP
        assertEquals(SERVICE_PROVIDER_URL, testIdentityParticipantStack.peek(currentSessionID));
    }

    /**
     * <p>
     * Tests the StrictPostBinding configuration.
View Full Code Here

Examples of org.python.pydev.core.structure.FastStack.peek()

                FindScopeVisitor scopeVisitor = new FindScopeVisitor(startLineIndexInASTCoords,
                        selection.getCursorColumn() + 1);
                module.accept(scopeVisitor);
                ILocalScope scope = scopeVisitor.scope;
                FastStack scopeStack = scope.getScopeStack();
                currentScope = (SimpleNode) scopeStack.peek(); //at least the module should be there if we don't have anything.
            } catch (Exception e1) {
                Log.log(e1);
            }

            GetNodeForExtractLocalVisitor visitor = new GetNodeForExtractLocalVisitor(startLineIndexInASTCoords);
View Full Code Here

Examples of org.rhq.core.domain.cloud.composite.FailoverListComposite.peek()

                                // we don't have to failover to another server; the current one is the one we already want
                                if (failover_list.hasNext()) {
                                    String currentAddress = agent_config.getServerBindAddress();
                                    int currentPort = agent_config.getServerBindPort();
                                    String currentTransport = agent_config.getServerTransport();
                                    ServerEntry nextServer = failover_list.peek();

                                    if (currentAddress.equals(nextServer.address)
                                        && currentPort == (SecurityUtil.isTransportSecure(currentTransport) ? nextServer.securePort
                                            : nextServer.port)) {
                                        // we are already pointing to the primary server, so all we have to do is
View Full Code Here

Examples of org.shiftone.cache.util.RingFifo.peek()

        RingFifo fifo = new RingFifo(5);

        assertEquals(",,,,", fifo.dump());
        fifo.enqueue("A");
        assertEquals("A", fifo.peek());
        assertEquals("A,,,,", fifo.dump());
        fifo.enqueue("B");
        assertEquals("A,B,,,", fifo.dump());
        fifo.enqueue("C");
        assertEquals("A,B,C,,", fifo.dump());
View Full Code Here

Examples of org.sonar.duplications.token.TokenQueue.peek()

  public void shouldThrowAnException() {
    TokenMatcher tokenMatcher = mock(TokenMatcher.class);
    StatementChannel channel = StatementChannel.create(tokenMatcher);
    StatementChannelDisptacher dispatcher = new StatementChannelDisptacher(Arrays.asList(channel));
    TokenQueue tokenQueue = mock(TokenQueue.class);
    when(tokenQueue.peek()).thenReturn(new Token("a", 1, 0)).thenReturn(null);
    List<Statement> statements = mock(List.class);

    dispatcher.consume(tokenQueue, statements);
  }
View Full Code Here

Examples of org.springframework.beans.factory.parsing.ParseState.peek()

  public void testSimple() throws Exception {
    MockEntry entry = new MockEntry();

    ParseState parseState = new ParseState();
    parseState.push(entry);
    assertEquals("Incorrect peek value.", entry, parseState.peek());
    parseState.pop();
    assertNull("Should get null on peek()", parseState.peek());
  }

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

Examples of org.xmlBlaster.util.queue.I_Queue.peek()

               }
            }
         }
      }
     
      List<I_Entry> list = queue.peek(maxEntries, maxSize);
      ArrayList entryListChecked = DispatchManager.prepareMsgsFromQueue(ME, log, queue, list);
     
      MsgQueueEntry[] entries = (MsgQueueEntry[])entryListChecked.toArray(new MsgQueueEntry[entryListChecked.size()]);
     
      ArrayList ret = new ArrayList(entries.length);
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.