Class FeatureSet
java.lang.Object
org.opendaylight.yangtools.yang.model.api.stmt.FeatureSet
- All Implemented Interfaces:
Immutable
A set of features.
The semantics of contains(QName)
is a bit funky, depending on implementation:
- explicit implementation, returned from
of()
,of(Set)
et al., delegates to the underlying Set'sSet.contains(Object)
, while on the other hand - sparse implementation, constructed via
builder()
andFeatureSet.Builder.build()
, carves the features into well-knownmodule
namespaces, expressed asQNameModule
for which we have an explicit enumeration of supported features. All othermodule
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
A builder for a sparse FeatureSet. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull FeatureSet.Builder
builder()
abstract boolean
Determine whether a particularfeature
, as identified by itsQName
is part of this set.abstract boolean
abstract int
hashCode()
static @NonNull FeatureSet
of()
Return an emptyFeatureSet
.static @NonNull FeatureSet
Return aFeatureSet
containing specified features.static @NonNull FeatureSet
Return aFeatureSet
containing specified features.abstract String
toString()
-
Constructor Details
-
FeatureSet
public FeatureSet()
-
-
Method Details
-
of
Return an emptyFeatureSet
.- Returns:
- An empty
FeatureSet
-
of
Return aFeatureSet
containing specified features.- Returns:
- A
FeatureSet
- Throws:
NullPointerException
- iffeatures
is or containsnull
-
of
Return aFeatureSet
containing specified features.- Returns:
- A
FeatureSet
- Throws:
NullPointerException
- iffeatures
is or containsnull
-
builder
-
contains
Determine whether a particularfeature
, as identified by itsQName
is part of this set.- Parameters:
qname
- Feature QName- Returns:
true
if this set contains the feature- Throws:
NullPointerException
- ifqname
isnull
-
hashCode
public abstract int hashCode() -
equals
-
toString
-