Is Interface API always constant?
I assume that you are asking if the
Set API can ever be changed in an incompatible way.
The only people who can actually guarantee that are Oracle.
I have not seen any guarantees (in writing) from Oracle, but based on past history, there is ZERO chance that they would alter the
Set API in a way that would impact binary compatibility for user code.
In short: don't worry about it. Certainly for any of the standard interfaces1 in Java SE.
1 - The internal interfaces are a different matter; e.g. any APIs in the
sun.* package tree. However, if you use them that's one of the risks that you are taking. Beware!