Examples of ValueType


Examples of org.drools.core.base.ValueType

            } else {
                InternalReadAccessor extractor = getFieldReadAccessor( context, relDescr, pattern.getObjectType(), values[0], null, true );
                if (extractor == null) {
                    normalizedExpr = subExprs[i++];
                } else {
                    ValueType vtype = extractor.getValueType();
                    LiteralRestrictionDescr restrictionDescr = new LiteralRestrictionDescr( relDescr.getOperator(),
                                                                                            relDescr.isNegated(),
                                                                                            relDescr.getParameters(),
                                                                                            values[1],
                                                                                            LiteralRestrictionDescr.TYPE_STRING );
View Full Code Here

Examples of org.drools.core.base.ValueType

                value1 = value1.substring(dotPos + 1);
                expr = expr.substring(dotPos + 1);
            }
        }

        ValueType vtype = extractor.getValueType();
        String operator = relDescr.getOperator().trim();
        LiteralRestrictionDescr restrictionDescr = buildLiteralRestrictionDescr(context, relDescr, value2, operator, isConstant);

        if (restrictionDescr != null) {
            FieldValue field = getFieldValue(context, vtype, restrictionDescr);
View Full Code Here

Examples of org.drools.core.base.ValueType

        public void setValue(final int index,
                             final Object value,
                             final InternalReadAccessor extractor) {
            this.index = index;
            final ValueType vtype = extractor.getValueType();

            isNull = extractor.isNullValue( null,
                                            value );

            if ( vtype.isBoolean() ) {
                this.type = BOOL;
                if ( !isNull ) {
                    this.bvalue = extractor.getBooleanValue( null,
                                                             value );
                    this.setHashCode( this.bvalue ? 1231 : 1237 );
                } else {
                    this.setHashCode( 0 );
                }
            } else if ( vtype.isIntegerNumber() || vtype.isChar() ) {
                this.type = LONG;
                if ( !isNull ) {
                    this.lvalue = extractor.getLongValue( null,
                                                          value );
                    this.setHashCode( (int) (this.lvalue ^ (this.lvalue >>> 32)) );
                } else {
                    this.setHashCode( 0 );
                }
            } else if ( vtype.isFloatNumber() ) {
                this.type = DOUBLE;
                if ( !isNull ) {
                    this.dvalue = extractor.getDoubleValue( null,
                                                            value );
                    final long temp = Double.doubleToLongBits( this.dvalue );
View Full Code Here

Examples of org.drools.core.base.ValueType

                             final InternalReadAccessor extractor,
                             final FieldValue value) {
            this.index = index;

            this.isNull = value.isNull();
            final ValueType vtype = extractor.getValueType();

            if ( vtype.isBoolean() ) {
                this.type = BOOL;
                if ( !isNull ) {
                    this.bvalue = value.getBooleanValue();
                    this.setHashCode( this.bvalue ? 1231 : 1237 );
                } else {
                    this.setHashCode( 0 );
                }
            } else if ( vtype.isIntegerNumber() ) {
                this.type = LONG;
                if ( !isNull ) {
                    this.lvalue = value.getLongValue();
                    this.setHashCode( (int) (this.lvalue ^ (this.lvalue >>> 32)) );
                } else {
                    this.setHashCode( 0 );
                }
            } else if ( vtype.isFloatNumber() ) {
                this.type = DOUBLE;
                if ( !isNull ) {
                    this.dvalue = value.getDoubleValue();
                    final long temp = Double.doubleToLongBits( this.dvalue );
                    this.setHashCode( (int) (temp ^ (temp >>> 32)) );
View Full Code Here

Examples of org.drools.core.base.ValueType

                value1 = value1.substring(dotPos + 1);
                expr = expr.substring(dotPos + 1);
            }
        }

        ValueType vtype = extractor.getValueType();
        String operator = relDescr.getOperator().trim();
        LiteralRestrictionDescr restrictionDescr = buildLiteralRestrictionDescr(context, relDescr, value2, operator, isConstant);

        if (restrictionDescr != null) {
            FieldValue field = getFieldValue(context, vtype, restrictionDescr);
View Full Code Here

Examples of org.eclipse.jst.jsf.common.internal.types.ValueType

            // per JSP.2.3.4, if instance of list (unbounded in our terminology)
            if (objSymbol.supportsCoercion(TypeConstants.TYPE_LIST))
            {
                //typeDesc = objSymbol.coerce(TypeConstants.TYPE_LIST);
                final EList<ValueType> args = new BasicEList<ValueType>();
                args.add(new ValueType(Signature.SIG_INT, ValueType.ASSIGNMENT_TYPE_RHS));
                return objSymbol.call("get", args, base.getName()+"["+offset+"]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
            }

            return getCCAttrsSymbolIfNecessary(typeDesc);
            // check unconstrained type
View Full Code Here

Examples of org.eclipse.papyrus.sysml.blocks.ValueType

   */
  public void setDimension(Element dataType, InstanceSpecification instanceSpecification) {
    if (dataType.getStereotypeApplications() != null) {
      EObject stereotype = dataType.getStereotypeApplications().get(0);
      if (stereotype instanceof ValueType) {
        ValueType valueType = (ValueType)stereotype;
        if (instanceSpecification.getStereotypeApplications() != null) {
          stereotype = instanceSpecification.getStereotypeApplications().get(0);
          if (stereotype instanceof Dimension) {
            Dimension dimension = (Dimension)stereotype;
            valueType.setDimension(dimension);
          }
        }
      }
    }
  }
View Full Code Here

Examples of org.encog.ml.prg.expvalue.ValueType

          if (!first) {
            final List<String> cols = EncogFileSection
                .splitColumns(line);
            final String name = cols.get(0);
            final String t = cols.get(1);
            ValueType vt = null;

            if (t.equalsIgnoreCase("f")) {
              vt = ValueType.floatingType;
            } else if (t.equalsIgnoreCase("b")) {
              vt = ValueType.booleanType;
View Full Code Here

Examples of org.eurekaj.api.enumtypes.ValueType

        return unitType;
    }

    private ValueType getValueType(String param) {
        ValueType valueType = ValueType.VALUE;

        if (param.equalsIgnoreCase("value")) {
            valueType = ValueType.VALUE;
        } else if (param.equalsIgnoreCase("aggregate")) {
            valueType = ValueType.AGGREGATE;
View Full Code Here

Examples of org.gwtnode.dev.debug.message.ValueType

            objectCache.freeJavaScriptObject(id);
        }
    }
   
    Value<?> getValueFromJavaScriptObject(Object jsObject) {
        ValueType type = ValueType.values()[getValueTypeOrdinalFromJavaScriptObject(jsObject)];
        if (type == ValueType.JAVA_OBJECT) {
            Integer val = objectCache.getJavaObjectId((JavaScriptObject) jsObject);
            if (val != null) {
                return type.createValueFromObject(val);
            } else {
                return ValueType.JAVA_SCRIPT_OBJECT.createValueFromObject(
                        objectCache.getJavaScriptObjectId((JavaScriptObject) jsObject, true));
            }
        } else {
            return type.createValueFromObject(jsObject);
        }
    }
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.