Top Description Fields Constructors Methods
org.jruby

public Class RubyArithmeticSequence

extends RubyObject
Class Inheritance
Annotations
@JRubyClass
name:Enumerator::ArithmeticSequence
parent:Enumerator
Imports
org.jruby.anno.JRubyClass, .JRubyMethod, org.jruby.runtime.Block, .CallSite, .Helpers, .JavaSites.FiberSites, .JavaSites.NumericSites, .ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.util.ByteList, .Numeric

Implements Enumerator::ArithmeticSequence

Field Summary

Modifier and TypeField and Description
private IRubyObject[]
private IRubyObject
private IRubyObject
private IRubyObject
private IRubyObject
private String
private IRubyObject
Inherited from org.jruby.RubyObject:
IVAR_INSPECTING_OBJECT_ALLOCATOROBJECT_ALLOCATORREIFYING_OBJECT_ALLOCATOR

Constructor Summary

AccessConstructor and Description
public
public
RubyArithmeticSequence(Ruby runtime, RubyClass klass, IRubyObject generatedBy, String method, IRubyObject[] args, IRubyObject begin, IRubyObject end, IRubyObject step, IRubyObject excludeEnd)

Method Summary

Modifier and TypeMethod and Description
public IRubyObject
public static RubyClass
public IRubyObject
each(ThreadContext context, Block block)

public IRubyObject
each_cons(ThreadContext context, IRubyObject arg, final Block block)

public IRubyObject
each_slice(ThreadContext context, IRubyObject arg, final Block block)

public IRubyObject
each_with_object(final ThreadContext context, IRubyObject arg, Block block)

public IRubyObject
end(ThreadContext context)

public IRubyObject
private static JavaSites.FiberSites
public IRubyObject
public IRubyObject
private IRubyObject
public RubyFixnum
hash(ThreadContext
the current thread context
context
)

Overrides org.jruby.RubyBasicObject.hash.

Will return the hash code of this object.

public RubyString
inspect(ThreadContext context)

Overrides org.jruby.RubyBasicObject.inspect.

Overrides default org.jruby.runtime.builtin.IRubyObject.inspect.

Returns a string containing a human-readable representation of obj.

public IRubyObject
public IRubyObject
public static RubyArithmeticSequence
newArithmeticSequence(ThreadContext context, IRubyObject generatedBy, String method, IRubyObject[] args, IRubyObject begin, IRubyObject end, IRubyObject step, IRubyObject excludeEnd)

public IRubyObject
op_equal(ThreadContext context, IRubyObject other)

Overrides org.jruby.RubyBasicObject.op_equal.

Implements org.jruby.runtime.builtin.IRubyObject.op_equal.

rb_obj_equal Will by default use identity equality to compare objects.

private static JavaSites.NumericSites
sites(ThreadContext context)

Hides org.jruby.RubyObject.sites.

Retrieve the call sites for this class.

public IRubyObject
private static IRubyObject
size(ThreadContext context, RubyArithmeticSequence self, IRubyObject[] args)

A size method suitable for lambda method reference implementation of RubyEnumerator.SizeFn#size(ThreadContext, IRubyObject, IRubyObject[])

public IRubyObject
public IRubyObject
with_index(ThreadContext context, final Block block)

public IRubyObject
with_index(ThreadContext context, IRubyObject arg, final Block block)

Inherited from org.jruby.RubyObject:
attachToObjectSpacecallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitconvertToTypedigdig1dig2eqlInternalequalInternalequalsfinishObjectClassgetNativeClassIndexhashCodeinspectop_eqqputsspecificEvaltoRubyStringtoString

Field Detail

argsback to summary
private IRubyObject[] args
beginback to summary
private IRubyObject begin
endback to summary
private IRubyObject end
excludeEndback to summary
private IRubyObject excludeEnd
generatedByback to summary
private IRubyObject generatedBy
methodback to summary
private String method
stepback to summary
private IRubyObject step

Constructor Detail

RubyArithmeticSequenceback to summary
public RubyArithmeticSequence(Ruby runtime, RubyClass klass)
RubyArithmeticSequenceback to summary
public RubyArithmeticSequence(Ruby runtime, RubyClass klass, IRubyObject generatedBy, String method, IRubyObject[] args, IRubyObject begin, IRubyObject end, IRubyObject step, IRubyObject excludeEnd)

Method Detail

beginback to summary
public IRubyObject begin(ThreadContext context)
Annotations
@JRubyMethod
createArithmeticSequenceClassback to summary
public static RubyClass createArithmeticSequenceClass(ThreadContext context, RubyClass Enumerator, RubyModule Enumerable)
eachback to summary
public IRubyObject each(ThreadContext context, Block block)
Annotations
@JRubyMethod
each_consback to summary
public IRubyObject each_cons(ThreadContext context, IRubyObject arg, final Block block)
Annotations
@JRubyMethod
name:each_cons
each_sliceback to summary
public IRubyObject each_slice(ThreadContext context, IRubyObject arg, final Block block)
Annotations
@JRubyMethod
name:each_slice
each_with_objectback to summary
public IRubyObject each_with_object(final ThreadContext context, IRubyObject arg, Block block)
Annotations
@JRubyMethod
endback to summary
public IRubyObject end(ThreadContext context)
Annotations
@JRubyMethod
exclude_endback to summary
public IRubyObject exclude_end(ThreadContext context)
Annotations
@JRubyMethod
name:exclude_end?
fiberSitesback to summary
private static JavaSites.FiberSites fiberSites(ThreadContext context)
firstback to summary
public IRubyObject first(ThreadContext context)
Annotations
@JRubyMethod
firstback to summary
public IRubyObject first(ThreadContext context, IRubyObject num)
Annotations
@JRubyMethod
firstNoNumback to summary
private IRubyObject firstNoNum(ThreadContext context, IRubyObject b, IRubyObject e, IRubyObject s)
hashback to summary
public RubyFixnum hash(ThreadContext context)

Overrides org.jruby.RubyBasicObject.hash.

Doc from org.jruby.RubyBasicObject.hash.

Will return the hash code of this object. In comparison to MRI, this method will use the Java identity hash code instead of using rb_obj_id, since the usage of id in JRuby will incur the cost of some. ObjectSpace maintenance.

Parameters
context:ThreadContext

the current thread context

Returns:RubyFixnum

the hash value

Annotations
@JRubyMethod
name:hash
inspectback to summary
public RubyString inspect(ThreadContext context)

Overrides org.jruby.RubyBasicObject.inspect.

Overrides default org.jruby.runtime.builtin.IRubyObject.inspect.

Doc from org.jruby.RubyBasicObject.inspect.

Returns a string containing a human-readable representation of obj. If not overridden, uses the to_s method to generate the string. [ 1, 2, 3..4, 'five' ].inspect #=> "[1, 2, 3..4, \"five\"]" Time.new.inspect #=> "Wed Apr 09 08:54:39 CDT 2003"

Annotations
@JRubyMethod
lastback to summary
public IRubyObject last(ThreadContext context)
Annotations
@JRubyMethod
lastback to summary
public IRubyObject last(ThreadContext context, IRubyObject num)
Annotations
@JRubyMethod
newArithmeticSequenceback to summary
public static RubyArithmeticSequence newArithmeticSequence(ThreadContext context, IRubyObject generatedBy, String method, IRubyObject[] args, IRubyObject begin, IRubyObject end, IRubyObject step, IRubyObject excludeEnd)
op_equalback to summary
public IRubyObject op_equal(ThreadContext context, IRubyObject other)

Overrides org.jruby.RubyBasicObject.op_equal.

Implements org.jruby.runtime.builtin.IRubyObject.op_equal.

Doc from org.jruby.RubyBasicObject.op_equal.

rb_obj_equal Will by default use identity equality to compare objects. This follows the Ruby semantics. The name of this method doesn't follow the convention because hierarchy problems

Annotations
@JRubyMethod
name:==, eql?
@Override
sitesback to summary
private static JavaSites.NumericSites sites(ThreadContext context)

Hides org.jruby.RubyObject.sites.

Doc from org.jruby.RubyBasicObject.sites.

Retrieve the call sites for this class. It is expected that all Java-based core classes that do call site caching will have a similar method.

sizeback to summary
public IRubyObject size(ThreadContext context)
Annotations
@JRubyMethod
sizeback to summary
private static IRubyObject size(ThreadContext context, RubyArithmeticSequence self, IRubyObject[] args)

A size method suitable for lambda method reference implementation of RubyEnumerator.SizeFn#size(ThreadContext, IRubyObject, IRubyObject[])

See Also
RubyEnumerator.SizeFn#size(ThreadContext, IRubyObject, IRubyObject[])
stepback to summary
public IRubyObject step(ThreadContext context)
Annotations
@JRubyMethod
with_indexback to summary
public IRubyObject with_index(ThreadContext context, final Block block)
Annotations
@JRubyMethod
name:with_index
with_indexback to summary
public IRubyObject with_index(ThreadContext context, IRubyObject arg, final Block block)
Annotations
@JRubyMethod
name:with_index