java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<QName>
org.opendaylight.yangtools.yang.model.repo.api.FeatureSet
All Implemented Interfaces:
Iterable<QName>, Collection<QName>, Set<QName>, Immutable

@Beta public final class FeatureSet extends AbstractSet<QName> implements Immutable
Set of features. This is nominally a Set due to API pre-existing API contracts. This class needs to be used very carefully because its hashCode() and equals(Object) contracts do not conform to the specification laid out by Set and it cannot enumerate its individual component QNames -- thus breaking reflexivity requirement of equals(Object).

The semantics of contains(Object) is a bit funky, but reflects the default of supporting all encountered features without enumerating them. The map supplied to the constructor enumerates all module namespaces, expressed as QNameModule for which we have an explicit enumeration of supported features. All other module namespaces are treated as if there was no specification of supported features -- e.g. all features from those namespaces are deemed to be present in the instance.