Examples of peek()


Examples of org.apache.tajo.engine.planner.global.ExecutionBlockCursor.peek()

  public static class SubQueryCompletedTransition implements SingleArcTransition<Query, QueryEvent> {

    private boolean hasNext(Query query) {
      ExecutionBlockCursor cursor = query.getExecutionBlockCursor();
      ExecutionBlock nextBlock = cursor.peek();
      return !query.getPlan().isTerminal(nextBlock);
    }

    private void executeNextBlock(Query query) {
      ExecutionBlockCursor cursor = query.getExecutionBlockCursor();
View Full Code Here

Examples of org.apache.tapestry.services.Environment.peek()

    @Test
    public void peek_when_empty_returns_null()
    {
        Environment e = new EnvironmentImpl();

        assertNull(e.peek(Runnable.class));
        assertNull(e.peek(Map.class));
    }

    @Test
    public void push_and_pop()
View Full Code Here

Examples of org.apache.tapestry5.services.Environment.peek()

    @Test
    public void peek_when_empty_returns_null()
    {
        Environment e = new EnvironmentImpl();

        assertNull(e.peek(Runnable.class));
        assertNull(e.peek(Map.class));
    }

    @Test
    public void push_and_pop()
View Full Code Here

Examples of org.apache.tika.io.TikaInputStream.peek()

        TemporaryResources tmp = new TemporaryResources();
        try {
            TikaInputStream tis = TikaInputStream.get(input, tmp);

            byte[] prefix = new byte[1024]; // enough for all known formats
            int length = tis.peek(prefix);

            MediaType type = detectArchiveFormat(prefix, length);
            if (PackageParser.isZipArchive(type)
                    && TikaInputStream.isTikaInputStream(input)) {
                return detectZipFormat(tis);
View Full Code Here

Examples of org.apache.xml.security.stax.impl.XMLSecurityEventReader.peek()

            XMLEvent stdXmlEvent = xmlEventReader.nextEvent();
            XMLEvent secXmlEvent = xmlSecurityEventReader.nextEvent();
            Assert.assertEquals(stdXmlEvent.getEventType(), secXmlEvent.getEventType());

            XMLEvent stdPeekedXMLEvent = xmlEventReader.peek();
            XMLEvent secPeekedXMLEvent = xmlSecurityEventReader.peek();
            if (stdPeekedXMLEvent == null) {
                Assert.assertNull(secPeekedXMLEvent);
            } else {
                Assert.assertEquals(stdPeekedXMLEvent.getEventType(), secPeekedXMLEvent.getEventType());
            }
View Full Code Here

Examples of org.apache.xmlbeans.XmlCalendar.peek()

        Date gcd = gc.getTime();
        Assert.assertEquals(gdd, gcd);
       
        // set up 2/29, and read out Feb 29 in the year 1 BC.
        XmlCalendar gregcal = new GDate("--02-29").getCalendar();
        Assert.assertEquals(29, gregcal.peek(Calendar.DAY_OF_MONTH));
        Assert.assertEquals(2 - 1, gregcal.peek(Calendar.MONTH));
        Assert.assertEquals(1, gregcal.peek(Calendar.YEAR));
        Assert.assertEquals(0, gregcal.peek(Calendar.ERA));
        // repeat some tests to make sure it's stable.
        Assert.assertEquals(29, gregcal.peek(Calendar.DAY_OF_MONTH));
View Full Code Here

Examples of org.apache.xmlbeans.xml.stream.XMLInputStream.peek()

            newInputStream(r1);

        while( xpp.hasNext() || babel.hasNext() )
        {
            XMLEvent xppevent = xpp.peek();
            XMLEvent babelevent = babel.peek();

            if( !(""+xppevent).equals((""+babelevent)) )
                printError(xppevent, babelevent);
            else
            {
View Full Code Here

Examples of org.auraframework.instance.InstanceStack.peek()

            Map<String, Object> valueProviders, I extender, D def) throws QuickFixException {
        AuraContext context = Aura.getContextService().getCurrentContext();
        DefDescriptor<? extends RootDefinition> desc = null;

        InstanceStack instanceStack = context.getInstanceStack();
        Instance<?> parent = instanceStack.peek();

        this.descriptor = descriptor;
        this.originalDescriptor = descriptor;
        this.path = instanceStack.getPath();
        instanceStack.pushInstance(this, descriptor);
View Full Code Here

Examples of org.axonframework.domain.DomainEventStream.peek()

        entityManager.persist(entry);
        entityManager.flush();
        entityManager.clear();

        DomainEventStream stream = testSubject.readEvents("test", aggregateIdentifier);
        assertEquals(0L, stream.peek().getSequenceNumber());
    }

    @Test
    @Transactional
    public void testEntireStreamIsReadOnUnserializableSnapshot_WithError() {
View Full Code Here

Examples of org.beangle.struts2.view.template.ThemeStack.peek()

  protected Theme getTheme() {
    if (null == theme) {
      ThemeStack themestack = (ThemeStack) stack.getContext().get(Theme.THEME_STACK);
      if (null != themestack) {
        theme = themestack.peek();
      }
      if (null == theme) {
        theme = (Theme) stack.getContext().get(Theme.THEME);
      }
      return theme;
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.