Examples of reset()


Examples of org.antlr.v4.runtime.atn.ATNSimulator.reset()

    setTrace(false);
    _precedenceStack.clear();
    _precedenceStack.push(0);
    ATNSimulator interpreter = getInterpreter();
    if (interpreter != null) {
      interpreter.reset();
    }
  }

  /**
   * Match current input symbol against {@code ttype}. If the symbol type
View Full Code Here

Examples of org.apache.accumulo.core.iterators.aggregation.NumArraySummation.reset()

      assertTrue(la.length == 4);
      for (int i = 0; i < la.length - 1; i++) {
        assertTrue(la[i] == 4);
      }
      assertTrue(la[la.length - 1] == 0);
      nas.reset();
      la = NumArraySummation.bytesToLongArray(nas.aggregate().get());
      assertTrue(la.length == 0);
    } catch (Exception e) {
      e.printStackTrace();
      assertTrue(false);
View Full Code Here

Examples of org.apache.accumulo.core.iterators.aggregation.NumSummation.reset()

     
      ns.collect(new Value(NumSummation.longToBytes(Long.MIN_VALUE)));
      l = NumSummation.bytesToLong(ns.aggregate().get());
      assertTrue("l was " + l, l == Long.MIN_VALUE);
     
      ns.reset();
      l = NumSummation.bytesToLong(ns.aggregate().get());
      assertTrue("l was " + l, l == 0);
    } catch (Exception e) {
      assertTrue(false);
    }
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQBytesMessage.reset()

            }
        } catch (JMSException ex) {
            ex.printStackTrace();
        }
        try {
            msg.reset();
            assertTrue(msg.getBodyLength() == (len * 8));
        } catch (Throwable e) {
            e.printStackTrace();
            assertTrue(false);
        }
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQStreamMessage.reset()

    public void testReadBoolean() {
        ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
        try {
            msg.writeBoolean(true);
            msg.reset();
            assertTrue(msg.readBoolean());
            msg.reset();
            assertTrue(msg.readString().equals("true"));
            msg.reset();
            try {
View Full Code Here

Examples of org.apache.activemq.management.CountStatisticImpl.reset()

        assertLastTimeNotStartTime(stat);

        log.info("Counter is: " + stat);

        stat.reset();

        assertEquals(0, stat.getCount());
    }
}
View Full Code Here

Examples of org.apache.activemq.management.TimeStatisticImpl.reset()

        assertLastTimeNotStartTime(stat);

        log.info("Stat is: " + stat);

        stat.reset();

        assertEquals(0, stat.getCount());
        assertEquals(0, stat.getMinTime());
        assertEquals(0, stat.getMaxTime());
        assertEquals(0, stat.getTotalTime());
View Full Code Here

Examples of org.apache.activemq.store.kahadb.disk.util.DataByteArrayOutputStream.reset()

                final boolean forceToDisk = wb.forceToDisk;

                ByteSequence sequence = buff.toByteSequence();
               
                // Now we can fill in the batch control record properly.
                buff.reset();
                buff.skip(5+Journal.BATCH_CONTROL_RECORD_MAGIC.length);
                buff.writeInt(sequence.getLength()-Journal.BATCH_CONTROL_RECORD_SIZE);
                if( journal.isChecksum() ) {
                  Checksum checksum = new Adler32();
                  checksum.update(sequence.getData(), sequence.getOffset()+Journal.BATCH_CONTROL_RECORD_SIZE, sequence.getLength()-Journal.BATCH_CONTROL_RECORD_SIZE);
View Full Code Here

Examples of org.apache.activemq.util.DataByteArrayOutputStream.reset()

                    }

                    // Now do the 1 big write.
                    ByteSequence sequence = buff.toByteSequence();
                    file.write(sequence.getData(), sequence.getOffset(), sequence.getLength());
                    buff.reset();
                }

                file.getFD().sync();

                WriteCommand lastWrite = (WriteCommand)wb.first.getTailNode();
View Full Code Here

Examples of org.apache.archiva.repository.content.maven2.FilenameParser.reset()

        {
            // Special Case: The filename might start with a version id (like "test-arch-1.0.jar").
            int idx = filename.indexOf( '-' );
            if ( idx > 0 )
            {
                parser.reset();
                // Take the first section regardless of content.
                String artifactId = parser.next();

                // Is there anything more that is considered not a version id?
                String moreArtifactId = parser.nextNonVersion();
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.