abstract class
Nanoarrow::ArrayBase(T)
- Nanoarrow::ArrayBase(T)
- Reference
- Object
Included Modules
- Enumerable(T?)
Direct Known Subclasses
- Nanoarrow::BoolArray
- Nanoarrow::Float32Array
- Nanoarrow::Float64Array
- Nanoarrow::Int32Array
- Nanoarrow::Int64Array
- Nanoarrow::StringArray
- Nanoarrow::UInt32Array
Defined in:
nanoarrow/array.crConstructors
Instance Method Summary
-
#[](index : Int) : T | Nil
Returns the element at index, supporting negative indices.
-
#[](range : Range) : Array(T | Nil)
Returns the sub-array for the given Range, supporting negative indices.
-
#compact : Array(T)
Returns a new Array containing only non-null values.
-
#each(& : T | Nil -> ) : Nil
Yields each element (nil for null entries).
-
#empty? : Bool
Returns
trueifselfdoes not contain any element. - #finalize
-
#inspect(io : IO) : Nil
Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.
- #length : Int64
- #null?(index : Int) : Bool
- #null_count : Int64
- #ptr : Pointer(LibNanoarrowBridge::ArrowArray)
- #release : Nil
- #released? : Bool
-
#size : Int64
Returns the number of elements in the collection.
-
#to_s(io : IO) : Nil
Appends a short String representation of this object which includes its class name and its object address.
- #to_unsafe : Pointer(LibNanoarrowBridge::ArrowArray)
-
#unsafe_get(index : Int64) : T | Nil
Subclasses implement raw element access (index is already bounds-checked).
Constructor Detail
Instance Method Detail
Returns the sub-array for the given Range, supporting negative indices.
Yields each element (nil for null entries). Provides the full Enumerable API.
Returns true if self does not contain any element.
([] of Int32).empty? # => true
([1]).empty? # => false
[nil, false].empty? # => false
#present?returns the inverse.
Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).inspect # => #<Person:0x10fd31f20 @name="John", @age=32>
Returns the number of elements in the collection.
[1, 2, 3, 4].size # => 4
Appends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>
Subclasses implement raw element access (index is already bounds-checked).