Package org.jruby.RubyEnumerator

Examples of org.jruby.RubyEnumerator.SizeFn


    private SizeFn repeatedPermutationSize(final ThreadContext context) {
        final Ruby runtime = context.runtime;
        final RubyArray self = this;

        return new SizeFn() {
            @Override
            public IRubyObject size(IRubyObject[] args) {
                RubyFixnum n = self.length();
                assert args != null && args.length > 0 && args[0] instanceof RubyNumeric; // #repeated_permutation ensures arg[0] is numeric
                long k = ((RubyNumeric) args[0]).getLongValue();
View Full Code Here


    }

    private SizeFn permutationSize(final ThreadContext context) {
        final RubyArray self = this;

        return new SizeFn() {
            @Override
            public IRubyObject size(IRubyObject[] args) {
                long n = self.realLength;
                long k;
View Full Code Here

TOP

Related Classes of org.jruby.RubyEnumerator.SizeFn

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.