Package abstrasy

Examples of abstrasy.Hash


    int ms = c.get(Calendar.MILLISECOND);
    int dd = c.get(Calendar.DAY_OF_MONTH);
    int mm = c.get(Calendar.MONTH);
    int yy = c.get(Calendar.YEAR);
        Node listOfPairs = Node.createHash();
        Hash hash=listOfPairs.getHash();
    hash.store(new Node(K_DAY), new Node(dd));
    hash.store(new Node(K_MONTH), new Node(mm + 1));
    hash.store(new Node(K_YEAR), new Node(yy));
    hash.store(new Node(K_HOUR), new Node(h));
    hash.store(new Node(K_MINUTE), new Node(m));
    hash.store(new Node(K_SECOND), new Node(s));
    hash.store(new Node(K_MILLIS), new Node(ms));
    return listOfPairs;
  }
View Full Code Here


    return listOfPairs;
  }

    private static  Node intToListOfPairs(int h, int m, int s, int ms, int dd, int mm, int yy) throws Exception {
        Node listOfPairs = Node.createHash();
        Hash hash=listOfPairs.getHash();
    if (dd != 0)
      hash.store(new Node(K_DAY), new Node(dd));
   
    if (mm != 0)
      hash.store(new Node(K_MONTH), new Node(mm));
   
    if (yy != 0)
      hash.store(new Node(K_YEAR), new Node(yy));
   
    if (h != 0)
      hash.store(new Node(K_HOUR), new Node(h));
   
    if (m != 0)
      hash.store(new Node(K_MINUTE), new Node(m + 1));
   
    if (s != 0)
      hash.store(new Node(K_SECOND), new Node(s));
   
    if (ms != 0)
      hash.store(new Node(K_MILLIS), new Node(ms));
   
    if (listOfPairs.size() == 0)
      hash.store(new Node(K_MILLIS), new Node(ms));
   
    return listOfPairs;
  }
View Full Code Here

        Node anode = startAt.getSubNode(1, Node.TYPE_HASH);
    long mps = 1000;
    long mpm = mps * 60;
    long mph = mpm * 60;
    long mpd = mph * 24;
        Hash hash=anode.getHash();
    int h = getNumPairValueIfExists(0, hash, new Node(K_HOUR));
    int m = getNumPairValueIfExists(0, hash, new Node(K_MINUTE));
    int s = getNumPairValueIfExists(0, hash, new Node(K_SECOND));
    int ms = getNumPairValueIfExists(0, hash, new Node(K_MILLIS));
    int dd = getNumPairValueIfExists(0, hash, new Node(K_DAY));
View Full Code Here

      int s = c.get(Calendar.SECOND);
      int ms = c.get(Calendar.MILLISECOND);
      int dd = c.get(Calendar.DAY_OF_MONTH);
      int mm = c.get(Calendar.MONTH);
      int yy = c.get(Calendar.YEAR);
            Hash hash=arg.getHash();
      h = getNumPairValueIfExists(h, hash, new Node(K_HOUR));
      m = getNumPairValueIfExists(m, hash, new Node(K_MINUTE));
      s = getNumPairValueIfExists(s, hash, new Node(K_SECOND));
      ms = getNumPairValueIfExists(ms,hash, new Node(K_MILLIS));
      dd = getNumPairValueIfExists(dd, hash, new Node(K_DAY));
View Full Code Here

      int s = c.get(Calendar.SECOND);
      int ms = c.get(Calendar.MILLISECOND);
      int dd = c.get(Calendar.DAY_OF_MONTH);
      int mm = c.get(Calendar.MONTH);
      int yy = c.get(Calendar.YEAR);
            Hash hash=anode.getHash();
      h = getNumPairValueIfExists(h, hash, new Node(K_HOUR));
      m = getNumPairValueIfExists(m, hash, new Node(K_MINUTE));
      s = getNumPairValueIfExists(s, hash, new Node(K_SECOND));
      ms = getNumPairValueIfExists(ms, hash, new Node(K_MILLIS));
      dd = getNumPairValueIfExists(dd, hash, new Node(K_DAY));
View Full Code Here

    if (anode.getQType()==Node.TYPE_NUMBER) {
      date.setTime(date.getTime() + (long) anode.getNumber());
    }
    else {
            // hash
            Hash hash = anode.getHash();
      Calendar c = Calendar.getInstance();
      c.setTime(date);
            Node tmp;
      tmp = getNumPairValue(hash, new Node(K_HOUR));
      if (tmp != null) {
View Full Code Here

    }

    public Node external_system_properties(Node startAt) throws Exception {
        startAt.isGoodArgsCnt(1);
        Node ynode = Node.createHash();
        Hash hash=ynode.getHash();
        Properties sprop = System.getProperties();
        Enumeration<?> eprop = sprop.propertyNames();
        while (eprop.hasMoreElements()) {
            String oid = (String) eprop.nextElement();
            hash.store(new Node(oid), new Node(sprop.getProperty(oid)));
        }
        return ynode;
    }
View Full Code Here

    }

    public Node external_env_properties(Node startAt) throws Exception {
        startAt.isGoodArgsLength(true, 1);
        Node ynode = Node.createHash();
        Hash hash=ynode.getHash();
        Map<String,String> map = System.getenv();
        Set<String> keys = map.keySet();
        Iterator<String> iterator = keys.iterator();
        while (iterator.hasNext()) {
            String key = iterator.next();
            String value = map.get(key);
            hash.store(new Node(key), new Node(value));
        }
        return ynode;
    }
View Full Code Here

        startAt.isGoodArgsLength(true, 2);
        String command = startAt.getSubNode(1, Node.TYPE_STRING).getString();
        Private_Execute pexec = new Private_Execute(command);
        int res = pexec.exec();
        Node rnode = Node.createHash();
        Hash hash=rnode.getHash();
        hash.store(Node.createQSymbol("result-code"), new Node(res));
        hash.store(Node.createQSymbol("output"), new Node(pexec.getOutput()));
        hash.store(Node.createQSymbol("error"), new Node(pexec.getError()));
        return rnode;
    }
View Full Code Here

                if (urlConnection instanceof HttpURLConnection) {
                    HttpURLConnection httpCon = (HttpURLConnection) urlConnection;

                    if (props != null) {
                        // il y a des propriétés header...
                        Hash hash=props.getHash();
                        ArrayList<String> ks=hash.keys_strings();
                        for (int i = 0; i < ks.size(); i++) {
                            String header_s = ks.get(i);
                            String value_s = Node.node2VString(hash.get(header_s)).getString();
                            Interpreter.Log("   HTTP-Header: " + header_s + " : " + value_s);
                            httpCon.setRequestProperty(header_s, value_s);
                        }
                    }
View Full Code Here

TOP

Related Classes of abstrasy.Hash

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.