Package org.exist.xquery.value

Examples of org.exist.xquery.value.DoubleValue


       
       
        Sequence result;
        final String functionName = getSignature().getName().getLocalName();
        if(PI.equals(functionName)) {
            result=new DoubleValue(Math.PI);
           
        } else {
            throw new XPathException(this, "Function "+functionName+" not found.");
        }
       
View Full Code Here


       
        final Random rnd = new Random();
     
      if(getArgumentCount() == 0) {
            if(isCalledAs("random")) {
                result = new DoubleValue(rnd.nextDouble());
            } else {
                final BigInteger rndInt = new BigInteger(64, rnd);
                result = new IntegerValue(rndInt, Type.UNSIGNED_LONG);
            }
      } else {
View Full Code Here

      // we just count the number of distinct terms matched
      while(nextMatch != null) {
        freq += nextMatch.getFrequency();
        nextMatch = nextMatch.getNextMatch();
      }
      result = new DoubleValue(freq);
    }
   
        if (context.getProfiler().isEnabled())
            {context.getProfiler().end(this, "", result);}
       
View Full Code Here

TOP

Related Classes of org.exist.xquery.value.DoubleValue

Copyright © 2018 www.massapicom. 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.