Top Description Fields Constructors Methods
org.jruby.ir.operands

public Class Range

extends ImmutableLiteral
Class Inheritance
Imports
org.jruby.RubyRange, .RubyRational, org.jruby.ir.IRVisitor, org.jruby.ir.persistence.IRReaderDecoder, .IRWriterEncoder, org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject

Literal Range with literal endpoints.

Field Summary

Modifier and TypeField and Description
private final ImmutableLiteral<T>
private final ImmutableLiteral<T>
private final boolean

Constructor Summary

AccessConstructor and Description
public
Range(ImmutableLiteral<T> begin, ImmutableLiteral<T> end, boolean exclusive)

Method Summary

Modifier and TypeMethod and Description
public Object
createCacheObject(ThreadContext context)

Implements abstract org.jruby.ir.operands.ImmutableLiteral.createCacheObject.

Implementing class is responsible for constructing the cached value.

public static Range
public void
public ImmutableLiteral<T>
public ImmutableLiteral<T>
public OperandType
public boolean
public boolean
isTruthyImmediate()

Overrides org.jruby.ir.operands.Operand.isTruthyImmediate.

Returns true if this is an immediate value that will always be considered truthy (true, numbers, etc)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public void
Inherited from org.jruby.ir.operands.ImmutableLiteral:
addUsedVariablescachedObjectcanCopyPropagatecloneForInlininghasKnownValueisCachedretrieve

Field Detail

beginback to summary
private final ImmutableLiteral<T> begin
endback to summary
private final ImmutableLiteral<T> end
exclusiveback to summary
private final boolean exclusive

Constructor Detail

Rangeback to summary
public Range(ImmutableLiteral<T> begin, ImmutableLiteral<T> end, boolean exclusive)

Method Detail

createCacheObjectback to summary
public Object createCacheObject(ThreadContext context)

Implements abstract org.jruby.ir.operands.ImmutableLiteral.createCacheObject.

Doc from org.jruby.ir.operands.ImmutableLiteral.createCacheObject.

Implementing class is responsible for constructing the cached value.

Annotations
@Override
decodeback to summary
public static Range decode(IRReaderDecoder d)
encodeback to summary
public void encode(IRWriterEncoder e)

Overrides org.jruby.ir.operands.Operand.encode.

Annotations
@Override
getBeginback to summary
public ImmutableLiteral<T> getBegin()
getEndback to summary
public ImmutableLiteral<T> getEnd()
getOperandTypeback to summary
public OperandType getOperandType()

Implements abstract org.jruby.ir.operands.Operand.getOperandType.

Annotations
@Override
isExclusiveback to summary
public boolean isExclusive()
isTruthyImmediateback to summary
public boolean isTruthyImmediate()

Overrides org.jruby.ir.operands.Operand.isTruthyImmediate.

Doc from org.jruby.ir.operands.Operand.isTruthyImmediate.

Returns true if this is an immediate value that will always be considered truthy (true, numbers, etc)

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
visitback to summary
public void visit(IRVisitor visitor)

Overrides org.jruby.ir.operands.Operand.visit.

Annotations
@Override