On Tue, 28 Nov 2023 19:20:18 GMT, Michael Strauß <mstra...@openjdk.org> wrote:
>> It should have been a Set maybe, or indeed a Collection. >> >> But it is too late: Node codifies the List return values: >> >> >> public static List<CssMetaData<? extends Styleable, ?>> >> getClassCssMetaData(); >> >> public List<CssMetaData<? extends Styleable, ?>> getCssMetaData(); > > Nir was probably referring to the type of the `list` parameter. > As for the return value, not only must this be a `List`, it should also be > mandated to be `RandomAccess`. Any implementation that doesn't support random > access may cause severe performance degradation. Right. The `list` argument *could* be a Collection, but I wanted to narrow down the scope of this utility to combining parent's and child's styleables in one efficient call. I thought having it accept a List (as returned by {Parent}.getClassCssMetaData()) and not some random Collection might be a better design. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1296#discussion_r1408368641