Package abstrasy

Examples of abstrasy.Hash$Item


           
        }

        if (qt==Node.TYPE_HASH) {
           
            Hash hash =xnode.getHash();
            ArrayList<Node> kn=hash.keys_nodes();
            for(int i=0;i<kn.size();i++) {
                Node k=kn.get(i);
                Node v=hash.ref(k);
                if (Node.equalsNodes(v, snode))
                    res.addElement(k.secure());
            }
           
        }
View Full Code Here


        Node a = startAt.getSubNode(1, CAST);
        Node b = startAt.getSubNode(2, a.getQType());

        boolean force_enc = (a.isQuoted() || a.getType() == Node.TYPE_LAZY);

        Hash r = new Hash();

        /*
         * Attention, si l'unification n'est pas valide, retourner une liste vide...
         */
        boolean res = PCFx_unify.unify_symbol(a, b, r, force_enc);
View Full Code Here

         *         
     */
   
   
        Node nhash=Node.createHash();
        Hash hash=nhash.getHash();
       
        if(startAt.size()==2){
            //
            // forme (hash hash)
            //
            Hash hash2=startAt.getSubNode(1, Node.TYPE_HASH).getHash();
            ArrayList<Node> kn=hash2.keys_nodes();
            for(int i=0;i<kn.size();i++)
                hash.store(kn.get(i), hash2.ref(kn.get(i)).secure());
            return nhash;
        }
       
        //   
        // autres formes...
View Full Code Here

            }
            return acc;
        }
        else {
            // hash
            Hash my_h=arg0.getHash().copy_my_self();
            for(int i=2;i < startAt.size();i++){
                Node ap=startAt.getSubNode(i, qt);
                Hash your_h=ap.getHash();
                ArrayList<Node> kn=your_h.keys_nodes();
                int kn_size=kn.size();
                for(int j=0;j<kn_size;j++)
                    my_h.store(kn.get(j),your_h.ref(kn.get(j)).secure());
            }
            return Node.createHash(my_h);
        }

    }
View Full Code Here

            }
            return null;
        }
        else{
            // hash
            Hash my_h=arg0.getHash();
            for(int i=2;i < startAt.size();i++){
                Node ap=startAt.getSubNode(i, qt);
                Hash your_h=ap.getHash();
                ArrayList<Node> kn=your_h.keys_nodes();
                int kn_size=kn.size();
                for(int j=0;j<kn_size;j++)
                    my_h.store(kn.get(j),your_h.ref(kn.get(j)).secure());
            }
            return null;
        }

    }
View Full Code Here

                     *
                     *  forme (@hash clé)
                     *
                     */
                    startAt.isGoodArgsCnt(3);
                    Hash hash = target.getHash();
                    target = hash.ref(startAt.getSubNode(2, Hash.KEY_TYPES));
                    return Node.createRef(target);
                }

            case Node.TYPE_CLIST:
                {
View Full Code Here

                        case Node.TYPE_CLIST:
                            {
                                /*
                                 * (remove! [primvals] from (hash ...))
                                 */
                                Hash hash=xnode.getHash();
                                for (int i = 0; i < inode.size(); i++) {
                                    Node enode = inode.getSubNode(i, Hash.KEY_TYPES);
                                    if(!hash.remove(enode))
                                        throw new InterpreterException(StdErrors.extend(StdErrors.Not_found, enode.toString()));
                                }
                                break;
                            }
                        default:
                            {
                                /*
                                 * (remove! primval from (hash ...))
                                 */
                                Hash hash=xnode.getHash();
                                if(!hash.remove(inode))
                                        throw new InterpreterException(StdErrors.extend(StdErrors.Not_found, inode.toString()));
                                break;
                            }
                    }
                }
View Full Code Here

        Node a = startAt.getSubNode(1, CAST);
        Node b = startAt.getSubNode(2, a.getQType());

        boolean force_enc = (a.isQuoted() || a.getType() == Node.TYPE_LAZY);

        Hash r = new Hash();

        /*
         * Attention, si l'unification n'est pas valide, retourner une liste vide...
         */
        if (!unify_symbol(a, b, r, force_enc)) {
            r = new Hash();
        }

        /*
         * Post-traitepment de r.
         */
        if (force_enc) {
            ArrayList<Node> kn=r.keys_nodes();
            for (int i = 0; i < kn.size(); i++)
                r.store(kn.get(i), Node.quoteEncoded_encode(r.ref(kn.get(i))));
        }

        return Node.createHash(r);
    }
View Full Code Here

                }
            case 4:
                {
                    startAt.requirePCode(2, PCoder.PC_IN);
                    c = Node.createClone(startAt.getSubNode(3, Node.VTYPE_METAEXPRESSION));
                    Hash l = startAt.getSubNode(1, Node.TYPE_HASH).getHash();

                    Node[] symbols = new Node[l.size()];
                    Node[] values = new Node[l.size()];

                    ArrayList<Node> kn = l.keys_nodes();
                    for (int i = 0; i < kn.size(); i++) {

                        Node a = kn.get(i);
                        a.requireNodeType(Node.TYPE_QSYMBOL);

                        Node b = l.ref(a);

                        a = Node.quoteEncoded_decode(a); /* astuce pour ici */
                        if (!b.isQuoted())
                            b = Node.quoteEncoded_encode(b);
                        b = Node.quoteEncoded_decode(b);
View Full Code Here

    Document doc = _docBuilder.newDocument();
    Element elem = doc.createElement("item-notes");
    Text textValue = doc.createTextNode("SalesID# 3445");
    elem.appendChild(textValue);
   
    Item item = pBuilder.createShoppingItem(itemName, itemDesc, quantity,
      unitPrice, null, currency, elem);
   
    assertEquals(itemName, item.getItemName());
    assertEquals(itemDesc, item.getItemDescription());
    assertEquals(quantity, item.getQuantity());
    assertEquals(4999.99F, item.getUnitPrice().getValue().floatValue());
    assertEquals(currency, item.getUnitPrice().getCurrency());
    assertEquals(elem, item.getMerchantPrivateItemData().getAny());
  }
View Full Code Here

TOP

Related Classes of abstrasy.Hash$Item

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.