class
Godot::PackedInt32Array
- Godot::PackedInt32Array
- Reference
- Object
Included Modules
- Enumerable(Int32)
Defined in:
libgodot/collections.crConstructors
- .from(items : Array(Int32)) : PackedInt32Array
- .new(size : Int, initial_value : Int32 = 0)
- .new(initial_items : Array(Int32))
- .new
Instance Method Summary
- #<<(value : Int32) : self
- #[](index : Int) : Int32
- #[]=(index : Int, value : Int32) : Int32
- #[]?(index : Int) : Int32 | Nil
- #append(value : Int32) : self
- #clear : Void
-
#each(&block : Int32 -> Void) : Void
Must yield this collection's elements to the block.
-
#empty? : Bool
Returns
trueifselfdoes not contain any element. - #is_empty : Bool
- #push(value : Int32) : self
- #resize(new_size : Int) : Void
-
#size : Int64
Returns the number of elements in the collection.
-
#to_a : Array(Int32)
Returns an
Arraywith all the elements in the collection.
Constructor Detail
Instance Method Detail
def each(&block : Int32 -> Void) : Void
#
Description copied from module Enumerable(Int32)
Must yield this collection's elements to the block.
def empty? : Bool
#
Description copied from module Enumerable(Int32)
Returns true if self does not contain any element.
([] of Int32).empty? # => true
([1]).empty? # => false
[nil, false].empty? # => false
#present?returns the inverse.
def size : Int64
#
Description copied from module Enumerable(Int32)
Returns the number of elements in the collection.
[1, 2, 3, 4].size # => 4