Commit bb9d4f1
committed
docs: explain public surface, delegation, and unsigned-array limit on ValueEquality
Expand the ValueEquality KDoc to answer the three questions a reader is most
likely to have about it:
- Why it is public with no in-tree caller: it is a deliberate, forward-looking
primitive that hand-written (or later generated) value types target for their
array-typed fields.
- Why contentEquals is a thin wrapper over Objects.deepEquals: to pair
symmetrically with contentHashCode, for which the JDK offers no
Objects.deepHashCode counterpart, giving callers one contract-paired API.
- That Kotlin unsigned arrays (UByteArray, etc.) are not recognized as arrays
and fall through to identity-based equals/hashCode, with the asXxxArray()
workaround for content semantics.
Doc-only; no signature or behavior change (apiCheck unchanged).1 parent 4163614 commit bb9d4f1
1 file changed
Lines changed: 15 additions & 0 deletions
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
43 | 53 | | |
44 | 54 | | |
45 | 55 | | |
| |||
59 | 69 | | |
60 | 70 | | |
61 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
62 | 77 | | |
63 | 78 | | |
64 | 79 | | |
| |||
0 commit comments