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)
aot
codec
codec / csv
codec / json
collection
- ArrayList
- BPlusTree
- Cache
- Collectors
- HashMap
- HashSet
- Heap
- ImmutableList
- ImmutableMap
- ImmutableSet
- LinkedList
- RedBlackTree
- Sort
collection / ltm
concurrent
error
- Exception
- NoOptionalValueException
- NotProvidedException
- RecoverableException
- ScopedBuildFailedException
- ScopeNotActiveException
- Throwable
- UnrecoverableException
gfx
hash
ifx
io
io / file
io / net
io / net / dns
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
Pair<K, V>
cajeta.lang.Pair — two-field generic value type, the foundation for stdlib
APIs that pair two values together (HashMap.entries() returns a Stream of
Pair<K, V>, ImmutableMap is built from a list of pairs). The surface
exposes only the first() and second() getters — mutating the fields after
construction isn’t supported; construct a new pair instead.
Pair<String, int32> p = heap Pair<String, int32>("ada", 36);
String who = p.first(); // "ada"
int32 yrs = p.second(); // 36
Methods
| Signature | |
|---|---|
Pair(K first, V second) ⚑ | Builds a pair from its two components |
K first() | The first component |
V second() | The second component |
⚑ = @EntryPoint
See also
- Tour: ImmutableMapDemo
- Source:
runtime/src/cajeta/lang/Pair.cajeta - HashMap —
entries()streams pairs - ImmutableMap — built from
ArrayList<Pair<K, V>>