Examples of RecordType


Examples of org.nfctools.ndef.RecordType

  private Map<RecordType, WellKnownRecordConfig> recordDecoders = new HashMap<RecordType, WellKnownRecordConfig>();

  @Override
  public boolean canDecode(NdefRecord ndefRecord) {
    if(NdefConstants.TNF_WELL_KNOWN == ndefRecord.getTnf()) {
      return recordDecoders.containsKey(new RecordType(ndefRecord.getType()));
    }
    return false;
  }
View Full Code Here

Examples of org.openquark.cal.compiler.RecordType

            if (typeExpr.isListType()) {
                if (typeExpr.rootTypeConsApp() == null) {
                    ((TypeApp)typeExpr).getOperandType();
                }
            } else if (typeExpr.isTupleType()) {
                RecordType rt = (RecordType)typeExpr;
                Map<FieldName, TypeExpr> hasFieldsMap = rt.getHasFieldsMap();
                for (Iterator<TypeExpr> it = hasFieldsMap.values().iterator(); it.hasNext();) {
                    updateInputableImports(it.next());
                }
            } else if (!typeExpr.isFunctionType()) {
                if (tca != null) {
View Full Code Here

Examples of org.yinwang.yin.value.RecordType

            for (Node p : parents) {
                Value pv = p.interp(s);
                properties.putAll(((RecordType) pv).properties);
            }
        }
        Value r = new RecordType(name.id, this, properties);
        s.putValue(name.id, r);
        return r;
    }
View Full Code Here

Examples of org.yinwang.yin.value.RecordType

                // add all properties or all fields in parent
                properties.putAll(parentProps);
            }
        }

        Value r = new RecordType(name.id, this, properties);
        s.putValue(name.id, r);
        return r;
    }
View Full Code Here

Examples of org.yinwang.yin.value.RecordType

    public Value interp(Scope s) {
        Scope properties = new Scope();
        for (Map.Entry<String, Node> e : map.entrySet()) {
            properties.putValue(e.getKey(), e.getValue().interp(s));
        }
        return new RecordType(null, this, properties);
    }
View Full Code Here

Examples of org.yinwang.yin.value.RecordType

    public Value typecheck(Scope s) {
        Scope properties = new Scope();
        for (Map.Entry<String, Node> e : map.entrySet()) {
            properties.putValue(e.getKey(), e.getValue().typecheck(s));
        }
        return new RecordType(null, this, properties);
    }
View Full Code Here

Examples of ptolemy.data.type.RecordType

        for (int i = 0; i < size; i++) {
            labels[i] = ((Port) portArray[i]).getName();
            types[i] = BaseType.GENERAL;
        }

        RecordType declaredType = new RecordType(labels, types);

        input.setTypeAtMost(declaredType);

        // set the constraints between record fields and output ports
        List constraints = new LinkedList();
View Full Code Here

Examples of ptolemy.data.type.RecordType

         */
        public Object getValue() throws IllegalActionException {
            if (input.getType() == BaseType.UNKNOWN) {
                return BaseType.UNKNOWN;
            } else if (input.getType() instanceof RecordType) {
                RecordType type = (RecordType) input.getType();
                Type fieldType = type.get(_name);

                if (fieldType == null) {
                    return BaseType.UNKNOWN;
                } else {
                    return fieldType;
View Full Code Here

Examples of ptolemy.data.type.RecordType

        /** Return an additional string describing the current value
         *  of this function.
         */
        public String getVerboseString() {
            if (input.getType() instanceof RecordType) {
                RecordType type = (RecordType) input.getType();
                Type fieldType = type.get(_name);

                if (fieldType == null) {
                    return "Input Record doesn't have field named " + _name;
                }
            }
View Full Code Here

Examples of ptolemy.data.type.RecordType

        // Force the type of the defaultProperties to at least include
        // the range field.
        String[] labels = { "range" };
        Type[] types = { BaseType.DOUBLE };
        RecordType type = new RecordType(labels, types);

        // Setting an upper bound allows the addition of fields.
        defaultProperties.setTypeAtMost(type);
        defaultProperties.setExpression("{range=Infinity}");
    }
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.