Examples of todouble()


Examples of org.apache.xml.utils.XMLString.toDouble()

    throws javax.xml.transform.TransformerException
  {

    XMLString s = xstr();

    return s.toDouble();
  }

  /**
   * Cast result object to a boolean.  This always returns true for a RTreeFrag
   * because it is treated like a node-set with a single root node.
View Full Code Here

Examples of org.exolab.castor.xml.schema.Facet.toDouble()

            Facet facet = (Facet)enumeration.nextElement();
            String name = facet.getName();

            //-- maxExclusive
            if (Facet.MAX_EXCLUSIVE.equals(name))
                setMaxExclusive(facet.toDouble());
            //-- maxInclusive
            else if (Facet.MAX_INCLUSIVE.equals(name))
                setMaxInclusive(facet.toDouble());
            //-- minExclusive
            else if (Facet.MIN_EXCLUSIVE.equals(name))
View Full Code Here

Examples of org.geotools.feature.visitor.CalcResult.toDouble()

            }
            CalcResult calcResult = sdVisit.getResult();
            if (calcResult == null) {
                return null;
            }
            double standardDeviation = calcResult.toDouble();
           
            //figure out the min and max values
            Double min[] = new Double[classNum];
            Double max[] = new Double[classNum];
            for (int i = 0; i < classNum; i++) {
View Full Code Here

Examples of org.geotools.feature.visitor.MaxVisitor.MaxResult.toDouble()

        assertEquals((double) 4.5, maxResult3.toDouble(), 0);
        //test for destruction during merge
        CalcResult maxResult4 = new MaxResult((Comparable) new Double(2));
        CalcResult maxResult5 = (MaxResult) maxResult4.merge(maxResult1);
        assertEquals(3, maxResult5.toDouble(), 0);
        assertEquals(2, maxResult4.toDouble(), 0);
        //test negative result
        CalcResult maxResult6 = new MaxResult((Comparable) new Integer(-5));
        CalcResult maxResult7 = (MaxResult) maxResult1.merge(maxResult6);
        assertEquals(3, maxResult7.toDouble(), 0);
        assertEquals(-5, maxResult6.toDouble(), 0);
View Full Code Here

Examples of org.geotools.feature.visitor.MedianVisitor.MedianResult.toDouble()

        List vals = new ArrayList();
        vals.add(new Double(2.5)); vals.add(new Double(3.5)); vals.add(new Double(4.5));
        CalcResult medianResult4 = new MedianResult(vals);
        CalcResult medianResult5 = medianResult4.merge(medianResult1);
        assertEquals(2.75, medianResult5.toDouble(), 0);
        assertEquals(3.5, medianResult4.toDouble(), 0);
        //test a mock optimization
        medianVisitor1.setValue(new Double(544));
        medianResult1 = medianVisitor1.getResult();
        try {
          medianResult3 = medianResult5.merge(medianResult1);
View Full Code Here

Examples of org.gstreamer.Fraction.toDouble()

    public double getVideoSinkFrameRate() {
      for (Element sink : getSinks()) {
        for (Pad pad : sink.getPads()) {
          Fraction frameRate = Video.getVideoFrameRate(pad);
          if (frameRate != null) {
            return frameRate.toDouble();
          }
        }
      }
      return 0;
    }
View Full Code Here

Examples of org.gstreamer.Fraction.toDouble()

  public double getVideoSinkFrameRate() {
    for (Element sink : getSinks()) {
      for (Pad pad : sink.getPads()) {
        Fraction frameRate = Video.getVideoFrameRate(pad);
        if (frameRate != null) {
          return frameRate.toDouble();
        }
      }
    }
    return 0;
  }
View Full Code Here

Examples of org.locationtech.udig.style.advanced.utils.Alignments.toDouble()

            int s2 = anchorHorizontalCombo.getSelectionIndex();
            String hItem = anchorHorizontalCombo.getItem(s2);

            Alignments vAlignment = Alignments.toAlignment(vItem);
            Alignments hAlignment = Alignments.toAlignment(hItem);
            String h = String.valueOf(hAlignment.toDouble());
            String v = String.valueOf(vAlignment.toDouble());
            notifyListeners(new String[]{h, v}, false, STYLEEVENTTYPE.LABELANCHOR);
        } else if (source.equals(rotationSpinner)) {
            int rotation = rotationSpinner.getSelection();
            String rotationStr = String.valueOf(rotation);
View Full Code Here

Examples of org.luaj.vm2.LuaNumber.todouble()

                        actualParam = param.get("raw").checkjstring();
                    } else if (!param.get("num").isnil()) {
                        if (param.get("num").isnumber()) {
                            LuaNumber number = param.get("num").checknumber();
                            NumberFormat nf = NumberFormat.getInstance(Locale.forLanguageTag(lang));
                            actualParam = nf.format(number.todouble());
                        } else {
                            actualParam = param.get("num").tojstring();
                        }
                    } else {
                        actualParam = "unknown";
View Full Code Here

Examples of org.luaj.vm2.LuaValue.todouble()

        break;
      case LuaValue.TNUMBER:
        switch (NUMBER_FORMAT) {
        case NUMBER_FORMAT_FLOATS_OR_DOUBLES:
          writer.write(LuaValue.TNUMBER);
          dumpDouble(o.todouble());
          break;
        case NUMBER_FORMAT_INTS_ONLY:
          if ( ! ALLOW_INTEGER_CASTING && ! o.isint() )
            throw new java.lang.IllegalArgumentException("not an integer: "+o);
          writer.write(LuaValue.TNUMBER);
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.