Open
Description
We are currently representing feed ids as String feedId
and these strings are passed around and used to create FeedScopedId
s. I propose to instead add a specific type Feed
to use instead of using strings. This Feed
will act as a factory for FeedScopedId
. This would give us a bit of type safety and get better control of how FeedScopedIds are created.
See PR #6516 for an illustration of what this could look like.
Before:
void doSomething(String feedId, ...) {
...
var id = new FeedScopedId(feedId, netexId);
...
}
After:
void doSomething(Feed feed, ...) {
...
var id = feed.scopedId(netexId);
...
}
What do people think about this?