Examples of entry()


Examples of org.jruby.RubyArray.entry()

        RubyArray arr = (RubyArray) arrParam;
        int count = arr.getLength();
        checkBounds(context, offset, count * 2);
        short[] array = new short[count];       
        for (int i = 0; i < array.length; ++i) {
            array[i] = Util.int16Value((IRubyObject) arr.entry(i));
        }
        getMemoryIO().put(getOffset(offset), array, 0, array.length);
        return this;
    }
    @JRubyMethod(name = { "get_array_of_int32", "get_array_of_int" }, required = 2)
View Full Code Here

Examples of org.jruby.RubyArray.entry()

        RubyArray arr = (RubyArray) arrParam;
        int count = arr.getLength();
        checkBounds(context, offset, count * 4);
        int[] array = new int[count];
        for (int i = 0; i < array.length; ++i) {
            array[i] = Util.int32Value((IRubyObject) arr.entry(i));
        }
        getMemoryIO().put(getOffset(offset), array, 0, array.length);
        return this;
    }
    @JRubyMethod(name = "get_array_of_long", required = 2)
View Full Code Here

Examples of org.jruby.RubyArray.entry()

        RubyArray arr = (RubyArray) arrParam;
        int count = arr.getLength();
        checkBounds(context, offset, count * 8);
        long[] array = new long[count];
        for (int i = 0; i < array.length; ++i) {
            array[i] = Util.int64Value((IRubyObject) arr.entry(i));
        }
        getMemoryIO().put(getOffset(offset), array, 0, array.length);
        return this;
    }
    @JRubyMethod(name = { "get_array_of_float32", "get_array_of_float" }, required = 2)
View Full Code Here

Examples of org.jruby.RubyArray.entry()

        RubyArray arr = (RubyArray) arrParam;
        int count = arr.getLength();
        checkBounds(context, offset, count * 4);
        float[] array = new float[count];
        for (int i = 0; i < array.length; ++i) {
            array[i] = Util.floatValue((IRubyObject) arr.entry(i));
        }
        getMemoryIO().put(getOffset(offset), array, 0, array.length);
        return this;
    }
    @JRubyMethod(name = { "get_array_of_float64", "get_array_of_double" }, required = 2)
View Full Code Here

Examples of org.jruby.RubyArray.entry()

        RubyArray arr = (RubyArray) arrParam;
        int count = arr.getLength();
        checkBounds(context, offset, count * 8);
        double[] array = new double[count];
        for (int i = 0; i < array.length; ++i) {
            array[i] = Util.doubleValue((IRubyObject) arr.entry(i));
        }
        getMemoryIO().put(getOffset(offset), array, 0, array.length);
        return this;
    }
    @JRubyMethod(name = "get_string")
View Full Code Here

Examples of org.jruby.RubyArray.entry()

    public IRubyObject createInvoker(ThreadContext context, IRubyObject[] args)
    {
        RubyArray paramTypes = (RubyArray) args[3];
        NativeParam[] nativeParamTypes = new NativeParam[paramTypes.size()];
        for (int i = 0; i < paramTypes.size(); ++i) {
            IRubyObject obj = (IRubyObject) paramTypes.entry(i);
            if (obj instanceof NativeParam) {
                nativeParamTypes[i] = (NativeParam) obj;
            } else if (obj instanceof RubyInteger) {
                nativeParamTypes[i] = NativeType.valueOf(Util.int32Value(obj));
            } else {
View Full Code Here

Examples of org.jruby.RubyArray.entry()

    public IRubyObject createCallback(ThreadContext context, IRubyObject returnType, IRubyObject _paramTypes)
    {
        RubyArray paramTypes = (RubyArray) _paramTypes;
        NativeType[] nativeParamTypes = new NativeType[paramTypes.size()];
        for (int i = 0; i < paramTypes.size(); ++i) {
            nativeParamTypes[i] = NativeType.valueOf(Util.int32Value((IRubyObject) paramTypes.entry(i)));
        }
        try {
            return createCallback(context.getRuntime(),
                    NativeType.valueOf(Util.int32Value(returnType)), nativeParamTypes);
        } catch (UnsatisfiedLinkError ex) {
View Full Code Here

Examples of org.jruby.RubyArray.entry()

    }

    private static void addEntries(ThreadContext context, ZipOutputStream zip, RubyHash entries) throws IOException {
        RubyArray keys = entries.keys().sort(context, Block.NULL_BLOCK);
        for (int i = 0; i < keys.getLength(); i++) {
            IRubyObject key = keys.entry(i);
            IRubyObject value = entries.op_aref(context, key);
            addEntry(context, zip, key.convertToString().getUnicodeValue(), value);
        }
    }
View Full Code Here

Examples of org.jruby.RubyArray.entry()

    // arrays are handled recursively:
    if (rubyObject instanceof RubyArray) {
      RubyArray rubyArray = (RubyArray) rubyObject;
      int length = rubyArray.getLength();
      for (int i = 0; i < length; i++) {
        fetchRowsFromScriptOutput(rubyArray.entry(i), inRow, r, rowList, forFields, forRow);
      }
      return;
    }

    // at this point the returned object is not nil, not a hash and not an array, let's ignore the output but warn in the log
View Full Code Here

Examples of org.onebusaway.api.model.transit.BeanFactoryV2.entry()

    BeanFactoryV2 factory = getBeanFactoryV2();
    ItineraryV2BeanFactory itineraryFactory = new ItineraryV2BeanFactory(
        factory);

    GraphResultV2Bean bean = itineraryFactory.getGraphResult(vertices.getList());
    return setOkResponse(factory.entry(bean));
  }

}
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.