Examples of FloatValue


Examples of de.ailis.jollada.model.FloatValue

     *            The element attributes.
     */

    private void enterFloat(final Attributes attributes)
    {
        this.floatValue = new FloatValue(0);
        this.floatValue.setSid(attributes.getValue("sid"));
        this.stringBuilder = new StringBuilder();
        enterElement(ParserMode.FLOAT);
    }
View Full Code Here

Examples of eu.planets_project.pp.plato.model.values.FloatValue

        Double d = 0.0;
        for (Measurement entry : list) {
            INumericValue value = (INumericValue) entry.getValue();
            d+= value.value();
        }
        FloatValue average = (FloatValue) new FloatScale().createValue();
        average.setValue(d/list.size());
        measurement.setValue(average);
        return measurement;
    }
View Full Code Here

Examples of eu.scape_project.planning.model.values.FloatValue

    @Test
    public void testTransformThresholdStepping_increasingOrder() {
        NumericTransformer numTran = new NumericTransformer();
        numTran.setMode(TransformationMode.THRESHOLD_STEPPING);
        numTran.defaults(1.2, 0.8);
        FloatValue value = new FloatValue();
        value.setValue(1.12);
        TargetValue res = numTran.transform(value);
        Assert.assertTrue(res.getValue() == 4);
        value.setValue(0.81);
        res = numTran.transform(value);
        Assert.assertTrue(res.getValue() == 1);
    }
View Full Code Here

Examples of eu.stratosphere.types.FloatValue

      }
      return dl;
    case FLOAT:
      FloatListValue fl = new FloatListValue();
      for (Object item : avroList) {
        fl.add(new FloatValue((Float) item));
      }
      return fl;
    case LONG:
      LongListValue ll = new LongListValue();
      for (Object item : avroList) {
View Full Code Here

Examples of net.sf.saxon.value.FloatValue

         } else if (source instanceof Byte) {
             result = new IntegerValue((Byte)source);
         } else if (source instanceof Double) {
             result = new DoubleValue((Double)source);
         } else if (source instanceof Float) {
             result = new FloatValue((Float)source);
         } else if (source instanceof BigDecimal) {
             result = new DecimalValue((BigDecimal)source);
         } else if (source instanceof String) {
             result = new StringValue(((String)source));
         } else {
View Full Code Here

Examples of net.sf.saxon.value.FloatValue

    }

    public Value transform(Object source, TransformationContext context) {
        // WORKAROUND for ClassCastException in ObjectValue.toJavaObject(float)
        if (source instanceof Float) {
            return new FloatValue(((Float)source).floatValue());
        }
        return new ObjectValue(source);
    }
View Full Code Here

Examples of net.sf.saxon.value.FloatValue

         } else if (source instanceof Byte) {
             result = new IntegerValue((Byte)source);
         } else if (source instanceof Double) {
             result = new DoubleValue((Double)source);
         } else if (source instanceof Float) {
             result = new FloatValue((Float)source);
         } else if (source instanceof BigDecimal) {
             result = new DecimalValue((BigDecimal)source);
         } else if (source instanceof String) {
             result = new StringValue(((String)source));
         } else {
View Full Code Here

Examples of net.sf.saxon.value.FloatValue

    }

    public Value transform(Object source, TransformationContext context) {
        // WORKAROUND for ClassCastException in ObjectValue.toJavaObject(float)
        if (source instanceof Float) {
            return new FloatValue(((Float)source).floatValue());
        }
        return new ObjectValue(source);
    }
View Full Code Here

Examples of net.sf.saxon.value.FloatValue

    }

    public Value transform(Object source, TransformationContext context) {
        // WORKAROUND for ClassCastException in ObjectValue.toJavaObject(float)
        if (source instanceof Float) {
            return new FloatValue(((Float)source).floatValue());
        }
        return new ObjectValue(source);
    }
View Full Code Here

Examples of net.sf.saxon.value.FloatValue

        } else if (source instanceof Byte) {
            result = new IntegerValue((Byte)source);
        } else if (source instanceof Double) {
            result = new DoubleValue((Double)source);
        } else if (source instanceof Float) {
            result = new FloatValue((Float)source);
        } else if (source instanceof BigDecimal) {
            result = new DecimalValue((BigDecimal)source);
        } else if (source instanceof String) {
            result = new StringValue(((String)source));
        } else {
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.