ICU4C uses a C "interface" (USetAdder) in low-level code (uchar.c, uprops.c,
etc.) where that code just needs to add items to a set. The caller needs to
provide an implementation that just calls to the UnicodeSet methods. As a
result, low-level code does not depend on the UnicodeSet implementation, which
allows for smaller binaries when UnicodeSet is not otherwise used.
If/when ICU4J gets a build target with low-level code like this, but where
UnicodeSet should not be included, this mechanism could be ported to ICU4J.
It would probably take the shape of a Java interface (UnicodeSetAdder) and a
default implementation which has-a UnicodeSet.