| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static RubyArray | Returns: the new arraythe current thread context context, int to allocate length)Create an empty array with a specific allocated size. |
| public static RubyArray | Returns: the new arraythe current thread context context, long to allocate length)Create an empty array with a specific allocated size. |
| public static RubyString | Returns: the new stringthe current thread context context, RubyString the string to be duplicated string)Duplicate the given string and return a String (original subclass of String is not preserved). |
| public static RubyArray | Returns: the new arraythe current thread context context)Create a new array with the default allocation size |
| public static RubyArray | Returns: the new arraythe current thread context context, IRubyObject the lone element in the array one)Create a new array with a single element. |
| public static RubyArray | Returns: the new arraythe current thread context context, IRubyObject the lone element in the array one, IRubyObject the lone element in the array two)Create a new array with two elements. |
| public static RubyArray | Returns: the new arraythe current thread context context, IRubyObject... the elements of the array elements)Create a new array with many elements. |
| public static RubyArray | Returns: the new arraythe current thread context context, IRubyObject the first element elt1, IRubyObject the second element elt2, IRubyObject the third element elt3)Create a new array with three elements. |
| public static RubyArray | Returns: a new arraythe current thread context context, List<IRubyObject> the elements of the array list)Create a new array with many elements from a java.util.List. |
| public static RubyArray | Returns: the new arraythe current thread context context, Collection<? extends IRubyObject> the elements of the array elements)Create a new array with elements from the given Collection. |
| public static <T> RubyArray | Returns: the new arraythe current thread context context, T[] the elements to transform elements, BiFunction<ThreadContext, T, IRubyObject> the transformation function func)Create a new Array by applying the given function to the given elements. |
| public static RubyArray | Returns: a new arraythe current thread context context, IRubyObject... the elements of the array elements)Create a new array with many elements but do not copy the incoming array of elements. |
| public static RubyArray | Returns: the new arraythe current thread context context)Create a new array which is intended to be empty for its entire lifetime. |
| public static RubyHash | Returns: a new hashthe current thread context context)Create a new empty Hash instance. |
| public static RubyString | Returns: the new stringthe current thread context context)Create a new String which is intended to be empty for its entire lifetime. |
| public static RubyString | Returns: the new stringthe current thread context context, Encoding encoding)Create a new String which is intended to be empty for its entire lifetime with a specific encoding. |
| public static RubyString | Returns: the new RubyStringthe current thread context context, String the contents to become a string string)Creates a new frozen RubyString from the provided java String. |
| public static RubyHash | Returns: a new hashthe current thread context context)Create a new Hash instance. |
| public static RubyRational | Returns: a new Rationalthe current thread context context, long the numerator num, long the denominator den)Create a new Rational with the given long values for numerator and denominator. |
| public static RubyString | Returns: the new RubyStringthe current thread context context, ByteList the bytes to become a string bytes)Creates a new RubyString from the provided bytelist but use the supplied encoding if possible. |
| public static RubyString | Returns: the new RubyStringthe current thread context context, ByteList the bytes to become a string bytes, Encoding to be used (ignoring encoding of bytelist) encoding)Creates a new RubyString from the provided bytelist but use the supplied encoding if possible. |
| public static RubyHash | Returns: a new hashthe current thread context context)Create a new Hash instance. |
| public static RubyHash | Returns: a new hashthe current thread context context, IRubyObject the key key, IRubyObject the value value)Create a new Hash instance with the given pair, optimized for space. |
| public static RubyString | Returns: the new RubyStringthe current thread context context, byte[] the bytes to become a string bytes)Creates a new RubyString from the provided bytes. |
| public static RubyString | Returns: the new RubyStringthe current thread context context, byte[] the bytes to become a string bytes, int start index in source bytes start, int the length from start index in source bytes length)Creates a new RubyString from the provided bytes. |
| public static RubyString | Returns: the new RubyStringthe current thread context context, ByteList the bytes to become a string bytes)Creates a new RubyString from the provided bytelist. |
| public static RubyString | Returns: the new RubyStringthe current thread context context, ByteList the bytes to become a string bytes, Encoding encoding)Creates a new RubyString from the provided bytelist but use the supplied encoding if possible. |
| public static RubyString | Returns: the new RubyStringthe current thread context context, String the contents to become a string string, Encoding encoding)Creates a new RubyString from the provided java String. |
| public static RubyString | Returns: the new RubyStringthe current thread context context, String the contents to become a string string)Creates a new RubyString from the provided java String. |
| public static RubyStruct | newStruct(ThreadContext
the current thread context context, RubyClass structClass, Block block)Create a new Struct. |
| public static RubyStruct | newStruct(ThreadContext
the current thread context context, RubyClass structClass, IRubyObject name of class or first member of struct arg0, Block block)Create a new Struct. |
| public static RubyStruct | newStruct(ThreadContext
the current thread context context, RubyClass structClass, IRubyObject name of class or first member of struct arg0, IRubyObject a member of struct arg1, Block block)Create a new Struct. |
| public static RubyStruct | newStruct(ThreadContext
the current thread context context, RubyClass structClass, IRubyObject name of class or first member of struct arg0, IRubyObject a member of struct arg1, IRubyObject a member of struct arg2, Block block)Create a new Struct. |
| public static RubyStruct | newStruct(ThreadContext
the current thread context context, RubyClass expects either a reference to Struct or a subclass of Struct (Passwd for example) structClass, IRubyObject[] for thr struct args, Block block)Create a new Struct (prefer 0-3 arity versions of this function if you know you arity and it is Struct and not a subclass of Struct). |
| Create | back to summary |
|---|---|
| public Create() | |
| allocArray | back to summary |
|---|---|
| public static RubyArray Create an empty array with a specific allocated size. This should be used to make an array where you think you know how big the array will be and you plan on adding data after its construction. It is ok if you add more than this size (it will resize) or less than this size (it will waste a little more space). The goal is to size in a way where we will not have to arraycopy data when the Array grows.
| |
| allocArray | back to summary |
|---|---|
| public static RubyArray Create an empty array with a specific allocated size. This should be used to make an array where you think you know how big the array will be and you plan on adding data after its construction. It is ok if you add more than this size (it will resize) or less than this size (it will waste a little more space). The goal is to size in a way where we will not have to arraycopy data when the Array grows. This version differs from the int override in that it verifies your long value can fit into an int. It will raise if it cannot.
| |
| dupString | back to summary |
|---|---|
| public static RubyString dupString(ThreadContext context, RubyString string) Duplicate the given string and return a String (original subclass of String is not preserved).
| |
| newArray | back to summary |
|---|---|
| public static RubyArray Create a new array with the default allocation size
| |
| newArray | back to summary |
|---|---|
| public static RubyArray Create a new array with a single element.
| |
| newArray | back to summary |
|---|---|
| public static RubyArray Create a new array with two elements.
| |
| newArray | back to summary |
|---|---|
| public static RubyArray Create a new array with many elements.
| |
| newArray | back to summary |
|---|---|
| public static RubyArray Create a new array with three elements.
| |
| newArray | back to summary |
|---|---|
| public static RubyArray Create a new array with many elements from a java.util.List.
| |
| newArray | back to summary |
|---|---|
| public static RubyArray Create a new array with elements from the given Collection.
| |
| newArrayFrom | back to summary |
|---|---|
| public static <T> RubyArray Create a new Array by applying the given function to the given elements. The resulting Array will be constructed with a minimum amount of allocation.
| |
| newArrayNoCopy | back to summary |
|---|---|
| public static RubyArray Create a new array with many elements but do not copy the incoming array of elements.
| |
| newEmptyArray | back to summary |
|---|---|
| public static RubyArray Create a new array which is intended to be empty for its entire lifetime.
It can still grow but the intention is you think it won't grow (or cannot).
If you want a default-size array then use
| |
| newEmptyHash | back to summary |
|---|---|
| public static RubyHash newEmptyHash(ThreadContext context) Create a new empty Hash instance. The expectation is that it will remain empty, so we minimize allocation. Todo make this actually avoid allocating buckets by fixing RubyHash support for zero buckets.
| |
| newEmptyString | back to summary |
|---|---|
| public static RubyString newEmptyString(ThreadContext context) Create a new String which is intended to be empty for its entire lifetime.
It can still grow but the intention is you think it won't grow (or cannot).
If you want a default-size array then use
| |
| newEmptyString | back to summary |
|---|---|
| public static RubyString newEmptyString(ThreadContext context, Encoding encoding) Create a new String which is intended to be empty for its entire lifetime with
a specific encoding. It can still grow but the intention is you think it won't grow
(or cannot). If you want a default-size array then use
| |
| newFrozenString | back to summary |
|---|---|
| public static RubyString newFrozenString(ThreadContext context, String string) Creates a new frozen RubyString from the provided java String.
| |
| newHash | back to summary |
|---|---|
| public static RubyHash newHash(ThreadContext context) Create a new Hash instance.
| |
| newRational | back to summary |
|---|---|
| public static RubyRational newRational(ThreadContext context, long num, long den) Create a new Rational with the given long values for numerator and denominator.
| |
| newSharedString | back to summary |
|---|---|
| public static RubyString newSharedString(ThreadContext context, ByteList bytes) Creates a new RubyString from the provided bytelist but use the supplied encoding if possible. This bytelist may be from a shared source.
| |
| newSharedString | back to summary |
|---|---|
| public static RubyString newSharedString(ThreadContext context, ByteList bytes, Encoding encoding) Creates a new RubyString from the provided bytelist but use the supplied encoding if possible. This bytelist may be from a shared source.
| |
| newSmallHash | back to summary |
|---|---|
| public static RubyHash newSmallHash(ThreadContext context) Create a new Hash instance. Use this when you expect very few pairs. Todo provide a way to allocate a sized small hash
| |
| newSmallHash | back to summary |
|---|---|
| public static RubyHash newSmallHash(ThreadContext context, IRubyObject key, IRubyObject value) Create a new Hash instance with the given pair, optimized for space.
| |
| newString | back to summary |
|---|---|
| public static RubyString newString(ThreadContext context, byte[] bytes) Creates a new RubyString from the provided bytes.
| |
| newString | back to summary |
|---|---|
| public static RubyString newString(ThreadContext context, byte[] bytes, int start, int length) Creates a new RubyString from the provided bytes.
| |
| newString | back to summary |
|---|---|
| public static RubyString newString(ThreadContext context, ByteList bytes) Creates a new RubyString from the provided bytelist.
| |
| newString | back to summary |
|---|---|
| public static RubyString newString(ThreadContext context, ByteList bytes, Encoding encoding) Creates a new RubyString from the provided bytelist but use the supplied encoding if possible.
| |
| newString | back to summary |
|---|---|
| public static RubyString newString(ThreadContext context, String string, Encoding encoding) Creates a new RubyString from the provided java String.
| |
| newString | back to summary |
|---|---|
| public static RubyString newString(ThreadContext context, String string) Creates a new RubyString from the provided java String.
| |
| newStruct | back to summary |
|---|---|
| public static RubyStruct newStruct(ThreadContext context, RubyClass structClass, Block block) Create a new Struct.
| |
| newStruct | back to summary |
|---|---|
| public static RubyStruct newStruct(ThreadContext context, RubyClass structClass, IRubyObject arg0, Block block) Create a new Struct.
| |
| newStruct | back to summary |
|---|---|
| public static RubyStruct newStruct(ThreadContext context, RubyClass structClass, IRubyObject arg0, IRubyObject arg1, Block block) Create a new Struct.
| |
| newStruct | back to summary |
|---|---|
| public static RubyStruct newStruct(ThreadContext context, RubyClass structClass, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block) Create a new Struct.
| |
| newStruct | back to summary |
|---|---|
| public static RubyStruct newStruct(ThreadContext context, RubyClass structClass, IRubyObject[] args, Block block) Create a new Struct (prefer 0-3 arity versions of this function if you know you arity and it is Struct and not a subclass of Struct).
| |