Examples of each()


Examples of org.jolokia.backend.executor.MBeanServerExecutor.each()

    }

    private void checkMBeans(ObjectName oName) throws MBeanException, IOException, ReflectionException {
        MBeanServerExecutor servers = handler.getMBeanServerManager();
        final List<Boolean> result = new ArrayList<Boolean>();
        servers.each(oName, new MBeanServerExecutor.MBeanEachCallback() {
            public void callback(MBeanServerConnection pConn, ObjectName pName)
                    throws ReflectionException, InstanceNotFoundException, IOException, MBeanException {
                // Throws an InstanceNotFoundException
                pConn.getObjectInstance(pName);
                result.add(pConn.isRegistered(pName));
View Full Code Here

Examples of org.jruby.RubyArray.each()

            Block block) {
        // TODO: yield block while iterating
        RubyArray files = mapToPathnames(context, (RubyClass) recv,
                context.runtime.getDir().callMethod(context, "glob", args));
        if (block.isGiven()) {
            files.each(context, block);
            return context.nil;
        } else {
            return files;
        }
    }
View Full Code Here

Examples of org.jruby.RubyArray.each()

    @JRubyMethod
    public IRubyObject each_entry(ThreadContext context, Block block) {
        if (block.isGiven()) {
            // TODO: yield block while iterating
            RubyArray entries = callMethod(context, "entries").convertToArray();
            entries.each(context, block);
            return context.nil;
        } else {
            return context.runtime.getDir().callMethod(context, "foreach");
        }
    }
View Full Code Here

Examples of org.matheusdev.util.matrix.MatrixNf.each()

      for (int j = 0; j < offsets.length; j++) {
        offsets[j] = Math.abs(rand.nextInt() % 174174);
      }

      vals.each(new PosIterationCallback() {
        @Override
        public void call(int[] pos) {
          for (int i = 0; i < newPos.length; i++) {
            newPos[i] = (pos[i] + offsets[i]) % vals.getDimensions()[i];
          }
View Full Code Here

Examples of org.sgx.yuigwt.yui.model.ModelList.each()

@SuppressWarnings("unchecked")
protected void process() {
  ModelList ml = table1.dataModelList();
  final String template = "<li>Record index = {index} Data = {port} : {pname}</li>";
  final StringBuffer sb = new StringBuffer();
  ml.each(new ArrayListCallback<JavaScriptObject>() {
    @Override
    public boolean call(JavaScriptObject item_, int index) {
      Attribute item = item_.cast()
      JsObject data = item.getAttrs(new String[]{"select", "port", "pname"});
      String s = "";
View Full Code Here

Examples of org.sgx.yuigwt.yui.model.ModelList.each()

}

@SuppressWarnings("unchecked")
protected void deleteSelected() {
  ModelList ml = table1.dataModelList();
  ml.each(new ArrayListCallback<JavaScriptObject>() {
    @Override
    public boolean call(JavaScriptObject item_, int index) {//     
      Attribute item = item_.cast()
      JsObject data = item.getAttrs(new String[]{"select", "port", "pname"});
      if(data.objGetBoolean("select")) { 
View Full Code Here

Examples of org.waveprotocol.wave.client.gadget.StateMap.each()

  private void updatePrefsFromAttribute(String prefAttribute) {
    if (!stateToAttribute(userPrefs).equals(prefAttribute)) {
      StateMap prefState = attributeToState(prefAttribute);
      userPrefs.parse(prefState, true);
      log("Updating user prefs: ", userPrefs.toJson());
      prefState.each(new StateMap.Each() {
        @Override
        public void apply(String key, String value) {
          setGadgetPref(key, value);
        }
      });
View Full Code Here

Examples of org.waveprotocol.wave.client.gadget.StateMap.each()

    // callback.
    // TODO(user): Remove this workaround once this is fixed in GGS.
    ScheduleCommand.addCommand(new Task() {
      @Override
      public void execute() {
        deltaState.each(new Each() {
          @Override
          public void apply(final String key, final String value) {
            if (value != null) {
              modifyState(key, value);
            } else {
View Full Code Here

Examples of org.waveprotocol.wave.client.gadget.StateMap.each()

    StateMap deltaState = StateMap.create();
    deltaState.fromJsonObject(delta);
    final String gadgetId = getOrGenerateGadgetId();
    if (gadgetId != null) {
      deltaState.each(new Each() {
        @Override
        public void apply(final String key, final String value) {
          supplement.setGadgetState(gadgetId, key, value);
        }
      });
View Full Code Here

Examples of org.waveprotocol.wave.client.gadget.StateMap.each()

  private void updatePrefsFromAttribute(String prefAttribute) {
    if (!stateToAttribute(userPrefs).equals(prefAttribute)) {
      StateMap prefState = attributeToState(prefAttribute);
      userPrefs.parse(prefState, true);
      log("Updating user prefs: ", userPrefs.toJson());
      prefState.each(new StateMap.Each() {
        @Override
        public void apply(String key, String value) {
          setGadgetPref(key, value);
        }
      });
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.