Page MenuHomeDevCentral

Allow to get first item of a collection
ClosedPublic

Authored by dereckson on Jun 14 2023, 21:08.
Tags
None
Referenced Files
F3327646: D3197.id8158.diff
Mon, Jul 8, 18:36
F3323073: D3197.id8157.diff
Sun, Jul 7, 22:49
F3323020: D3197.id8156.diff
Sun, Jul 7, 22:45
F3322744: D3197.id8158.diff
Sun, Jul 7, 21:22
Unknown Object (File)
Sat, Jul 6, 22:38
Unknown Object (File)
Fri, Jul 5, 17:29
Unknown Object (File)
Wed, Jul 3, 15:30
Unknown Object (File)
Wed, Jul 3, 15:30
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 Not Applicable
Unit
Tests Not Applicable