Examples of Collection


Examples of org.zkoss.openlayers.geometry.Collection

    Vector polygonFeature = new Vector(new Polygon(
        Arrays.asList(linearRing)), toMap(pair("name", "dude"),
        pair("age", 21), pair("favColor", "purple"),
        pair("align", "lb")));

    Vector multiFeature = new Vector(new Collection(Arrays.asList(
        new LineString(Arrays.asList(new Point(-105, 40.0), new Point(
            -95, 45.0))), new Point(-105, 40))), toMap(
        pair("name", "ball-and-chain"), pair("age", 30),
        pair("favColor", "black"), pair("align", "rt")));
View Full Code Here

Examples of railo.runtime.type.Collection

     */
    public static Reference getInstance(Object o, String key) {
        if(o instanceof Reference) {
            return new ReferenceReference((Reference)o,key);
        }
        Collection coll = Caster.toCollection(o,null);
        if(coll!=null) return new VariableReference(coll,key);
        return new NativeReference(o,key);
    }
View Full Code Here

Examples of tools.dictionary.Collection

public class App {
  public static void main (String[] args) throws IOException {
    BufferedReader we = new BufferedReader(new InputStreamReader(System.in));
    PrintWriter wy = new PrintWriter(new OutputStreamWriter(System.out),true);
    PrintWriter bl = new PrintWriter(new OutputStreamWriter(System.err),true);
    Collection varCollection = new Collection();
    bl.println("hello");
    bl.print("> ");
    bl.flush();

    for (String instr=we.readLine(); instr!=null; instr=we.readLine())
      try {
        instr = instr.trim();
        if (instr.matches("^\\s*calc\\s+[\\x00-\\xff]*$") || instr.equals("calc")) {
          Pattern pattern = Pattern.compile("^\\s*calc\\s+([\\x00-\\xff]*)$");
          Matcher matcher = pattern.matcher(instr);
          if (matcher.find()) {
            Expression e = new Expression(varCollection,matcher.group(1));
            wy.format("%s\n",e.calculate());
            varCollection=e.getVarCollection();
          }
          else  
            throw new ExceptionRPN("calc needs expression");
        }
        else if (instr.matches("^\\s*clear\\s+[\\x00-\\xff]*$") || instr.equals("clear")) {
          String[] token = instr.split(" ");
          if (token.length==1)
            for (String s : varCollection.clear())
              wy.format("remove %s\n",s);
          else
            for (int i=1; i<token.length; ++i)
              try {
                varCollection.delete(token[i]);
                wy.format("remove %s\n",token[i]);
              }
              catch (Exception ex) {
                throw new RPN_VarNotFound(token[i]);
              }
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.