Package org.nlogo.nvm

Examples of org.nlogo.nvm.MutableLong


    return super.toString() + ":" + offset;
  }

  @Override
  public void perform(final Context context) {
    MutableLong counter = (MutableLong) context.getLet(let);
    if (counter.value() <= 0) {
      context.ip = next;
    } else {
      counter.value_$eq(counter.value() - 1);
      context.ip = offset;
    }
  }
View Full Code Here


      context.ip = offset;
    }
  }

  public void perform_1(final Context context) {
    MutableLong counter = (MutableLong) context.getLet(let);
    if (counter.value() <= 0) {
      context.ip = next;
    } else {
      counter.value_$eq(counter.value() - 1);
      context.ip = offset;
    }
  }
View Full Code Here

    return super.toString() + ":" + offset + "," + vn;
  }

  @Override
  public void perform(final org.nlogo.nvm.Context context) {
    MutableLong counter =
        (MutableLong) context.activation.args[vn];
    if (counter.value() <= 0) {
      context.ip = next;
    } else {
      counter.value_$eq(counter.value() - 1);
      context.ip = offset;
    }
  }
View Full Code Here

      context.ip = offset;
    }
  }

  public void perform_1(final org.nlogo.nvm.Context context) {
    MutableLong counter =
        (MutableLong) context.activation.args[vn];
    if (counter.value() <= 0) {
      context.ip = next;
    } else {
      counter.value_$eq(counter.value() - 1);
      context.ip = offset;
    }
  }
View Full Code Here

  @Override
  public void perform(final Context context)
      throws LogoException {
    context.activation.args[vn] =
        new MutableLong(validLong(argEvalDoubleValue(context, 0)));
    context.ip = offset;
  }
View Full Code Here

    context.ip = offset;
  }

  public void perform_1(final Context context, double arg0)
      throws LogoException {
    context.activation.args[vn] = new MutableLong(validLong(arg0));
    context.ip = offset;
  }
View Full Code Here

  public void perform(final Context context) throws LogoException {
    perform_1(context, argEvalDoubleValue(context, 0));
  }

  public void perform_1(final Context context, double d0) throws LogoException {
    context.let(let, new MutableLong(validLong(d0)));
    context.ip = offset;
  }
View Full Code Here

  @Override
  public void perform(final Context context)
      throws LogoException {
    long targetTime = System.nanoTime();
    targetTime += argEvalDoubleValue(context, 0) * 1000000000;
    context.let(let, new MutableLong(targetTime));
    context.ip = next;
  }
View Full Code Here

      runTimes.put(context.agent, tempMap);
    }

    //look up in the hash table lastRunTimes found in the job using the context.agent as
    //the lookup key to find the hash table of every calls by that agent
    MutableLong lastRunTime = tempMap.get(this);
    long currentTime = System.nanoTime();
    if (lastRunTime == null) {
      tempMap.put(this, new MutableLong(currentTime));
      // execute the commands in the block
      context.ip = next;
    } else if (currentTime >= lastRunTime.value() + delay) {
      lastRunTime.value_$eq(currentTime);
      // execute the commands in the block
      context.ip = next;
    } else {
      // skip over the block
      context.ip = offset;
View Full Code Here

TOP

Related Classes of org.nlogo.nvm.MutableLong

Copyright © 2018 www.massapicom. 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.