Package org.openquark.cal.internal.machine.g

Examples of org.openquark.cal.internal.machine.g.NRecordValue.fieldNames()


        Node genParams = executor.internalEvaluate(arguments[1]);
        Node independent = executor.internalEvaluate(arguments[2]);
       
        NValInt arbitraryMethodIndex = getIndexOfGenerateClassMethod(executor);
      
        List<String> fieldNames = recordDictionary.fieldNames();
        final int nFields = fieldNames.size();

        NRecordValue result=new NRecordValue(nFields);

        /*
 
View Full Code Here


            } else {
                fieldNameSortedInputMap = new TreeMap<Object, Object>(inputMap);
            }
        }
       
        final List<String> fieldNames = recordDictionary.fieldNames();       
        final int nFields = fieldNames.size();       
       
        //check that the number of fields in the input map is the same as the number of fields in the record.
        //without this check it is possible that input map could have more elements than the size of the record and still succeed.
        //This would still "work" but this check is useful to alert clients to potential bugs in their code.
View Full Code Here

            throws CALExecutorException {
            
        final NRecordValue record = (NRecordValue) executor.internalEvaluate(arguments[0]);
      
        //we need to go through the fields of the record in field-name order
        final List<String> fieldNames = record.fieldNames();       
        final int nFields = fieldNames.size();
               
        for (int i = 0; i < nFields; ++i) {
           
            final String fieldName = fieldNames.get(i);
View Full Code Here

        NRecordValue recordDictionary = (NRecordValue) executor.internalEvaluate(arguments[0]);
        List<?> inputList = (List<?>)((NValObject)executor.internalEvaluate(arguments[1])).getValue();
        //we use an iterator since inputList may be a non-random access list such as a java.util.LinkedList.
        Iterator<?> inputListIterator = inputList.iterator();
       
        List<String> fieldNames = recordDictionary.fieldNames();       
        int nFields = fieldNames.size();       
       
        //check that the number of fields in the inputList is the same as the number of fields in the record.
        //without this check it is possible that inputList could have more elements than the size of the record and still succeed.
        //This would still "work" but this check is useful to alert clients to potential bugs in their code.
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.