Page MenuHomeDevCentral

Allow to get first item of a collection
ClosedPublic

Authored by dereckson on Jun 14 2023, 21:08.
Tags
None
Referenced Files
F8887147: D3197.id8156.diff
Wed, May 21, 11:20
F8870418: D3197.id8158.diff
Wed, May 21, 03:57
F8837360: D3197.id8158.diff
Tue, May 20, 17:16
Unknown Object (File)
Tue, May 20, 10:57
Unknown Object (File)
Mon, May 19, 10:32
Unknown Object (File)
Sun, May 18, 06:20
Unknown Object (File)
Thu, May 15, 15:00
Unknown Object (File)
Thu, May 15, 09:35
Subscribers
None

Details

Summary

This changes add to BaseCollection classes the following methods:

  • first() will return the first item if it exists
  • firstOr() will return the first item if it exists, or a default value if not.

Both are implemented by the WithCollection trait.

Test Plan

Tested in Zed

Diff Detail

Repository
rKERUALD Keruald libraries development repository
Lint
Lint Passed
Unit
Test Failures
Branch
collection-first
Build Status
Buildable 5032
Build 5313: arc lint + arc unit