Examples of toLogoList()


Examples of org.nlogo.api.LogoListBuilder.toLogoList()

      if (random.nextInt(size - i) < n - j) {
        result.add(elt);
        j++;
      }
    }
    return result.toLogoList();
  }

  @Override
  public Syntax syntax() {
    return Syntax.reporterSyntax
View Full Code Here

Examples of org.nlogo.api.LogoListBuilder.toLogoList()

        Object elt = it.next();
        if (!Equality.equals(value, elt)) {
          listCopy.add(elt);
        }
      }
      return listCopy.toLogoList();
    } else if (obj instanceof String) {
      if (!(value instanceof String)) {
        throw new ArgumentTypeException(context, this, 0, Syntax.StringType(), value);
      }
      String string = (String) obj;
View Full Code Here

Examples of org.nlogo.api.LogoListBuilder.toLogoList()

                StrictMath.max(0, StrictMath.min(255, ((Double) list.get(2)).intValue())) / 255);
        LogoListBuilder hsbList = new LogoListBuilder();
        hsbList.add(Double.valueOf((argb >> 16) & 0xff));
        hsbList.add(Double.valueOf((argb >> 8) & 0xff));
        hsbList.add(Double.valueOf(argb & 0xff));
        return hsbList.toLogoList();
      } catch (ClassCastException e) {
        throw new org.nlogo.nvm.EngineException
            (context, this, displayName() + " an rgb list must contain only numbers");
      }
    } else if (obj instanceof Double) {
View Full Code Here

Examples of org.nlogo.api.LogoListBuilder.toLogoList()

              StrictMath.max(0, StrictMath.min(255, ((Double) list.get(2)).intValue())) / 255);
      LogoListBuilder hsbList = new LogoListBuilder();
      hsbList.add(Double.valueOf((argb >> 16) & 0xff));
      hsbList.add(Double.valueOf((argb >> 8) & 0xff));
      hsbList.add(Double.valueOf(argb & 0xff));
      return hsbList.toLogoList();
    } catch (ClassCastException e) {
      throw new org.nlogo.nvm.EngineException
          (context, this, displayName() + " an rgb list must contain only numbers");
    }
  }
View Full Code Here

Examples of org.nlogo.api.LogoListBuilder.toLogoList()

  public LogoList report_1(final Context context, double r, double g, double b) {
    LogoListBuilder rgbList = new LogoListBuilder();
    rgbList.add(Double.valueOf(StrictMath.max(0, StrictMath.min(255, r))));
    rgbList.add(Double.valueOf(StrictMath.max(0, StrictMath.min(255, g))));
    rgbList.add(Double.valueOf(StrictMath.max(0, StrictMath.min(255, b))));
    return rgbList.toLogoList();
  }
}
View Full Code Here

Examples of org.nlogo.api.LogoListBuilder.toLogoList()

      int currVal = counts.get(currKey).value();
      if (currVal == currMaxCount) {
        modes.add(currKey.getSourceObject());
      }
    }
    return modes.toLogoList();
  }

  @Override
  public Syntax syntax() {
    int[] right = {Syntax.ListType()};
View Full Code Here

Examples of org.nlogo.api.LogoListBuilder.toLogoList()

  private static LogoList cache() {
    LogoListBuilder result = new LogoListBuilder();
    for (int i = 0; i < 14; i++) {
      result.add(Double.valueOf(i * 10 + 5));
    }
    return result.toLogoList();
  }

  @Override
  public Syntax syntax() {
    return Syntax.reporterSyntax(Syntax.ListType());
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.