Examples of decrement()


Examples of aima.core.util.math.MixedRadixNumber.decrement()

  @Test
  public void testDecrement() {
    MixedRadixNumber mrn = new MixedRadixNumber(5, new int[] { 3, 2 });
    int i = 0;
    while (mrn.decrement()) {
      i++;
    }
    Assert.assertEquals(i, mrn.getMaxAllowedValue());
    i = 0;
    while (mrn.increment()) {
View Full Code Here

Examples of com.gs.collections.impl.Counter.decrement()

        Counter counter = this.items.get(item);
        if (counter != null)
        {
            if (counter.getCount() > 1)
            {
                counter.decrement();
            }
            else
            {
                this.items.remove(item);
            }
View Full Code Here

Examples of com.orientechnologies.common.types.OModifiableInteger.decrement()

      return false;
    else {
      if (counter.getValue() == 1)
        newEntries.remove(identifiable);
      else
        counter.decrement();
      return true;
    }
  }

  private Map.Entry<OIdentifiable, Integer> nextChangedNotRemovedSBTreeEntry(Iterator<Map.Entry<OIdentifiable, Integer>> iterator) {
View Full Code Here

Examples of com.scaleunlimited.cascading.LoggingFlowProcess.decrement()

                    LOGGER.warn("Unexpected exception while fetching " + item.getUrl(), e);

                    process.increment(FetchCounters.URLS_FAILED, 1);
                    status = new IOFetchException(item.getUrl(), new IOException(e));
                } finally {
                    process.decrement(FetchCounters.URLS_FETCHING, 1);

                    Tuple tuple = result.getTuple();
                    tuple.add(status);
                    _fetchMgr.collect(tuple);
View Full Code Here

Examples of com.scaleunlimited.cascading.LoggingFlowProcess.decrement()

            }
        } catch (Throwable t) {
            LOGGER.error("Exception while fetching", t);
        } finally {
            _fetchMgr.finished(_ref);
            process.decrement(FetchCounters.DOMAINS_PROCESSING, 1);
        }
    }

}
View Full Code Here

Examples of com.sun.sgs.test.impl.service.task.TestTaskServiceImpl.Counter.decrement()

            TestMultiNodeTaskServiceImpl.lastNodeUsed.
                set(AppContext.getManager(NodeIdManager.class).getNodeId());
            DataManager dataManager = AppContext.getDataManager();
            Counter counter = (Counter) dataManager.getBinding("counter");
            dataManager.markForUpdate(counter);
            counter.decrement();
        }
    }

    public interface NodeIdManager {
        public long getNodeId();
View Full Code Here

Examples of er.extensions.foundation.ERXMutableInteger.decrement()

     * <span>
     */
    private ERXMutableInteger _decrementReferenceCounterForKey(String key) {
        ERXMutableInteger count = (ERXMutableInteger)_referenceCounters().objectForKey(key);
        if (count != null
            count.decrement();
       
        if (log.isDebugEnabled())
            log.debug("_decrementReferenceCounterForKey() - count = " + count + ", key = " + key);
        return count;
    }
View Full Code Here

Examples of me.daddychurchill.CityWorld.Support.SurroundingFloors.decrement()

      // final floor is done... how about a roof then?
      if (floor == height - 1)
        drawRoof(generator, chunk, context, generator.streetLevel + aboveFloorHeight * (floor + 1) + 2, localInsetWallNS, localInsetWallWE, allowRounded, roofMaterial, neighborFloors);

      // one down, more to go
      neighborFloors.decrement();
      aboveFloorHeight = otherFloorHeight;
    }
  }
 
  @Override
View Full Code Here

Examples of net.kuujo.vertigo.cluster.data.AsyncCounter.decrement()

        data.decrementAndGet(new Handler<AsyncResult<Long>>() {
          @Override
          public void handle(AsyncResult<Long> result) {
            assertTrue(result.succeeded());
            assertTrue(result.result() == -1);
            data.decrement(new Handler<AsyncResult<Void>>() {
              @Override
              public void handle(AsyncResult<Void> result) {
                assertTrue(result.succeeded());
                data.get(new Handler<AsyncResult<Long>>() {
                  @Override
View Full Code Here

Examples of net.sf.clairv.p2p.util.Counter.decrement()

    final Counter counter = new Counter(1);
    this.endpoint.route(id, message, null, new DeliveryNotification() {

      public void sendFailed(MessageReceipt arg0, Exception arg1) {
        log.warn("Failed to send the message");
        counter.decrement();
      }

      public void sent(MessageReceipt receipt) {
        counter.decrement();
      }
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.