Package org.exist.xquery.value

Examples of org.exist.xquery.value.IntegerValue


      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 {
            final IntegerValue upper = (IntegerValue)args[0].convertTo(Type.INTEGER);
            result = new IntegerValue(rnd.nextInt(upper.getInt()));
      }
       
        return result;
    }
View Full Code Here


    else if(isCalledAs("count-instances-available"))
    {
      count = bp.available();
    }
   
    return new IntegerValue(count, Type.INTEGER);
  }
View Full Code Here

    public void intToOctal() throws XPathException {
       final XQueryContext mckContext = EasyMock.createMock(XQueryContext.class);

       final BaseConversionFunctions baseConversionFunctions = new BaseConversionFunctions(mckContext, BaseConversionFunctions.FNS_INT_TO_OCTAL);
       Sequence args[] = {
           new IntegerValue(511)
       };
      
       final Sequence result = baseConversionFunctions.eval(args, null);
      
       assertEquals(1, result.getItemCount());
View Full Code Here

TOP

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

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.