Examples of reset()


Examples of org.apache.commons.collections.ResettableListIterator.reset()

        assertEquals(false, it.hasPrevious());
        assertEquals(testValue, it.next());
        assertEquals(false, it.hasNext());
        assertEquals(true, it.hasPrevious());

        it.reset();
       
        assertEquals(true, it.hasNext());
        assertEquals(false, it.hasPrevious());
        assertEquals(testValue, it.next());
        assertEquals(false, it.hasNext());
View Full Code Here

Examples of org.apache.commons.collections15.ResettableIterator.reset()

        ordered = (OrderedMap) map;
        List list = new ArrayList(ordered.keySet());
        ResettableIterator it = (ResettableIterator) ordered.mapIterator();
        assertSame(list.get(0), it.next());
        assertSame(list.get(1), it.next());
        it.reset();
        assertSame(list.get(0), it.next());
    }

    //-----------------------------------------------------------------------
    public void testAccessOrder() {
View Full Code Here

Examples of org.apache.commons.collections15.ResettableListIterator.reset()

        assertEquals(false, it.hasPrevious());
        assertEquals(testValue, it.next());
        assertEquals(false, it.hasNext());
        assertEquals(true, it.hasPrevious());

        it.reset();

        assertEquals(true, it.hasNext());
        assertEquals(false, it.hasPrevious());
        assertEquals(testValue, it.next());
        assertEquals(false, it.hasNext());
View Full Code Here

Examples of org.apache.commons.compress.compressors.pack200.Pack200CompressorInputStream.reset()

            assertEquals(3, is.read(rest));
            assertEquals(0x4b, rest[0]);
            assertEquals(3, rest[1]);
            assertEquals(4, rest[2]);
            assertEquals(1, is.skip(1));
            is.reset();
            assertEquals(0x50, is.read());
            assertTrue(is.available() > 0);
        } finally {
            is.close();
        }
View Full Code Here

Examples of org.apache.commons.io.output.ByteArrayOutputStream.reset()

                {
                    continue;
                }
                buf.close();
                byte[] hdata = buf.toByteArray();
                buf.reset();
                if (colonIndex != -1)
                {
                    name = new String(hdata, 0, colonIndex, HTTPConstants.HEADER_DEFAULT_CHAR_ENCODING);
                    value = new String(hdata, colonIndex + 1, len - 1 - colonIndex,
                        HTTPConstants.HEADER_DEFAULT_CHAR_ENCODING);
View Full Code Here

Examples of org.apache.commons.lang.text.StrTokenizer.reset()

      Properties result = new Properties();
      StrTokenizer propertyTokenizer = StrTokenizer.getCSVInstance(input);
      StrTokenizer valueTokenizer = StrTokenizer.getCSVInstance();
      valueTokenizer.setDelimiterChar('=');
      while (propertyTokenizer.hasNext()){
        valueTokenizer.reset(propertyTokenizer.nextToken());
        String[] values = valueTokenizer.getTokenArray();
        if (values.length==2) {
          result.put(values[0], values[1]);
        }
      }
View Full Code Here

Examples of org.apache.commons.lang.time.StopWatch.reset()

      sites.add(s);
      siteGrid.insert(s);
    }
   
    System.out.println("  time grid: " + stopWatch);
    stopWatch.reset();
    stopWatch.start();
   
    /* approximate a polynomial at each site */

    Map<SiteWithPolynomial, List<SiteWithPolynomial>> nearestSiteMap
View Full Code Here

Examples of org.apache.commons.lang3.time.StopWatch.reset()

    // System.out.println("\t\t6: " + hierRenumber.renumber(6));
    // System.out.println("\t\t\t7: " + hierRenumber.renumber(7));
    // System.out.println("\t\t\t7: " + hierRenumber.renumber(7));
    sw.stop();
    System.out.println(sw.toString());
    sw.reset();
    hierRenumber = RenumberUtils.getIncrementRenumber("[###]", 0);
    System.out.println("\t\t\t7: " + hierRenumber.renumber());
    System.out.println("\t\t\t7: " + hierRenumber.renumber());
    System.out.println("\t\t\t7: " + hierRenumber.renumber());
    System.out.println("\t\t\t7: " + hierRenumber.renumber());
View Full Code Here

Examples of org.apache.commons.math.ode.events.CombinedEventsManager.reset()

                interpolator.setInterpolatedTime(nextStep);
                handler.handleStep(interpolator, lastStep);
            }
            stepStart = nextStep;

            if (!lastStep && manager.reset(stepStart, y)) {

                // some events handler has triggered changes that
                // invalidate the derivatives, we need to restart from scratch
                start(stepStart, y, t);
                interpolator.reinitialize(stepStart, stepSize, scaled, nordsieck);
View Full Code Here

Examples of org.apache.commons.math.ode.events.EventState.reset()

                    // the event asked to stop integration
                    System.arraycopy(eventY, 0, y, 0, y.length);
                    return eventT;
                }

                if (currentEvent.reset(eventT, eventY)) {
                    // some event handler has triggered changes that
                    // invalidate the derivatives, we need to recompute them
                    System.arraycopy(eventY, 0, y, 0, y.length);
                    computeDerivatives(eventT, y, yDot);
                    resetOccurred = true;
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.