Stdlib index
- Captured-borrow migration worklist (3.3.3)
- Owned-bind migration worklist (8.2.7)
- Return-side title audit — the ride-through enumeration
- stdlib ownership audit
- stdlib ownership dispositions (plan 1.3.1 / 4.3.1)
codec
codec / csv
codec / json
collection
- ArrayList
- BPlusTree
- Cache
- Collectors
- HashMap
- HashSet
- Heap
- ImmutableList
- ImmutableMap
- ImmutableSet
- LinkedList
- RedBlackTree
- Sort
collection / ltm
concurrent
error
gfx
hash
ifx
io
io / file
io / net
io / net / dns
io / net / tls
io / net / uri
lang
lang / stream
math
math / fft
math / linalg
math / npio
math / poly
math / random
math / stats
nucleo
- Columns — the Arrow-laid-out substrate
- Fused tensor expressions — Fuse
- Table — the lazy, typed dataframe
- Tape — define-by-run autograd
- Transform intrinsics — Grad, Vmap, Jit
process
reflect
search / distance
search / fuzzy
search / ngram
session
time
- Clock
- DateTimeFormatter
- Duration
- Instant
- LocalDate
- LocalDateTime
- LocalTime
- Period
- ZonedDateTime
- ZoneId
- ZoneOffset
wire
xpu
xpu / mesh
ArrayList<T>
cajeta.collection.ArrayList — growable, index-addressable sequence of T,
backed by a heap-allocated T[] that doubles its capacity on demand. The
workhorse list of the collections package and the default accumulator behind
Collectors.toList<T>().
ArrayList<int32> xs = heap ArrayList<int32>();
xs.add(10);
xs.add(20);
xs.add(30);
int32 n = xs.count(); // 3
xs.set(1, 25); // [10, 25, 30]
ArrayStream<int32> s #= xs.stream();
Methods
| Signature | |
|---|---|
ArrayList() ⚑ | Construct an empty list |
int32 count() | Live element count |
boolean isEmpty() | count() == 0 |
T get(int32 i) | Element at i (no bounds check) |
void set(int32 i, T v) | Replace the element at i |
void add(T v) | Append, doubling the backing array when full |
void appendAll(ArrayList<T> other) | Append every element of other; the parallel-stream combiner |
#ArrayStream<T> stream() | Walk the live elements as a Stream |
void sort() | In-place ascending sort, unstable (see Sort) |
void sortStable() | In-place merge sort — equal elements keep input order |
⚑ = @EntryPoint