class Godot::PackedInt64Array

Included Modules

Defined in:

libgodot/collections.cr

Constructors

Instance Method Summary

Constructor Detail

def self.from(items : Array(Int64)) : PackedInt64Array #

def self.new(size : Int, initial_value : Int64 = 0_i64) #

def self.new(initial_items : Array(Int64)) #

def self.new #

Instance Method Detail

def <<(value : Int64) : self #

def [](index : Int) : Int64 #

def []=(index : Int, value : Int64) : Int64 #

def []?(index : Int) : Int64 | Nil #

def append(value : Int64) : self #

def clear : Void #

def each(&block : Int64 -> Void) : Void #
Description copied from module Enumerable(Int64)

Must yield this collection's elements to the block.


def empty? : Bool #
Description copied from module Enumerable(Int64)

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 is_empty : Bool #

def push(value : Int64) : self #

def resize(new_size : Int) : Void #

def size : Int64 #
Description copied from module Enumerable(Int64)

Returns the number of elements in the collection.

[1, 2, 3, 4].size # => 4

def to_a : Array(Int64) #
Description copied from module Enumerable(Int64)

Returns an Array with all the elements in the collection.

(1..5).to_a # => [1, 2, 3, 4, 5]