|
| 1 | +class Array[unchecked out Elem] < Object |
| 2 | + include Enumerable[Elem] |
| 3 | + |
| 4 | + interface _Pattern[T] |
| 5 | + def ===: (T other) -> bool |
| 6 | + end |
| 7 | + |
| 8 | + def initialize: () -> void |
| 9 | + | (Integer size, ?Elem val) -> void |
| 10 | + |
| 11 | + def self.[]: [T](*T item) -> Array[T] |
| 12 | + |
| 13 | + def +: [T](Array[T] other) -> Array[Elem | T] |
| 14 | + |
| 15 | + def []: %a{implicitly-returns-nil} (Integer nth) -> Elem |
| 16 | + | (Range[Integer?] range) -> Array[Elem]? |
| 17 | + | (Integer start, Integer length) -> Array[Elem]? |
| 18 | + |
| 19 | + alias at [] |
| 20 | + |
| 21 | + def []=: (Integer nth, Elem val) -> Elem |
| 22 | + | (Integer start, Integer length, Elem val) -> Elem |
| 23 | + | (Integer start, Integer length, Array[Elem] val) -> Array[Elem] |
| 24 | + |
| 25 | + def clear: () -> self |
| 26 | + |
| 27 | + def difference: (*Array[untyped] other) -> Array[Elem] |
| 28 | + |
| 29 | + alias - difference |
| 30 | + |
| 31 | + def delete_at: %a{implicitly-returns-nil} (Integer index) -> Elem |
| 32 | + |
| 33 | + def empty?: () -> bool |
| 34 | + |
| 35 | + def size: () -> Integer |
| 36 | + |
| 37 | + alias length size |
| 38 | + |
| 39 | + alias count size |
| 40 | + |
| 41 | + def include?: (Elem val) -> bool |
| 42 | + |
| 43 | + def &: (Array[untyped] other) -> Array[Elem] |
| 44 | + |
| 45 | + def |: [T](Array[T] other) -> Array[Elem | T] |
| 46 | + |
| 47 | + def first: %a{implicitly-returns-nil} () -> Elem |
| 48 | + |
| 49 | + def last: %a{implicitly-returns-nil} () -> Elem |
| 50 | + |
| 51 | + def push: (Elem val) -> self |
| 52 | + |
| 53 | + alias << push |
| 54 | + |
| 55 | + def pop: () -> Elem? |
| 56 | + | (Integer n) -> Array[Elem] |
| 57 | + |
| 58 | + def shift: () -> Elem? |
| 59 | + | (Integer n) -> Array[Elem] |
| 60 | + |
| 61 | + def unshift: (Elem val) -> self |
| 62 | + |
| 63 | + def dup: () -> Array[Elem] |
| 64 | + |
| 65 | + def min: %a{implicitly-returns-nil} () -> Elem |
| 66 | + |
| 67 | + def max: %a{implicitly-returns-nil} () -> Elem |
| 68 | + |
| 69 | + def minmax: () -> [Elem?, Elem?] |
| 70 | + |
| 71 | + def uniq: () -> Array[Elem] |
| 72 | + |
| 73 | + def uniq!: () -> self? |
| 74 | + |
| 75 | + def reverse: () -> Array[Elem] |
| 76 | + |
| 77 | + def reverse!: () -> self |
| 78 | + |
| 79 | + def inspect: () -> String |
| 80 | + def self.inspect: () -> String |
| 81 | + |
| 82 | + alias to_s inspect |
| 83 | + alias self.to_s self.inspect |
| 84 | + |
| 85 | + def join: (?_ToS separator) -> String |
| 86 | + |
| 87 | + def all?: () -> bool |
| 88 | + | (_Pattern[Elem] pattern) -> bool |
| 89 | + | () { (Elem item) -> boolish } -> bool |
| 90 | + |
| 91 | + def any?: () -> bool |
| 92 | + | (_Pattern[Elem] pattern) -> bool |
| 93 | + | () { (Elem item) -> boolish } -> bool |
| 94 | + |
| 95 | + def collect!: () { (Elem item) -> Elem } -> self |
| 96 | + |
| 97 | + alias map! collect! |
| 98 | + |
| 99 | + def delete_if: () { (Elem item) -> boolish } -> self |
| 100 | + |
| 101 | + def each: () { (Elem item) -> void } -> self |
| 102 | + |
| 103 | + def each_index: () { (Integer index) -> void } -> self |
| 104 | + |
| 105 | + def index: (untyped val) -> Integer? |
| 106 | + | () { (Elem item) -> boolish } -> Integer? |
| 107 | + |
| 108 | + alias find_index index |
| 109 | + |
| 110 | + def none?: () -> bool |
| 111 | + | (_Pattern[Elem] pattern) -> bool |
| 112 | + | () { (Elem item) -> boolish } -> bool |
| 113 | + |
| 114 | + def reject!: () { (Elem item) -> boolish } -> self? |
| 115 | + |
| 116 | + def reject: () { (Elem item) -> boolish } -> Array[Elem] |
| 117 | + |
| 118 | + def reverse_each: () { (Elem item) -> void } -> self |
| 119 | + |
| 120 | + def select: () { (Elem item) -> boolish } -> Array[Elem] |
| 121 | + |
| 122 | + alias filter select |
| 123 | + |
| 124 | + def select!: () { (Elem item) -> boolish } -> self? |
| 125 | + |
| 126 | + alias filter! select! |
| 127 | + |
| 128 | + def sort!: () -> self |
| 129 | + | () { (Elem a, Elem b) -> Integer } -> self |
| 130 | + |
| 131 | + def sort: () -> Array[Elem] |
| 132 | + | () { (Elem a, Elem b) -> Integer } -> Array[Elem] |
| 133 | +end |
0 commit comments