Package dev.equo.solstice
Class Capability
java.lang.Object
dev.equo.solstice.Capability
- All Implemented Interfaces:
Comparable<Capability>
Represents an OSGi capability as a namespace plus N key-value pairs. Order is significant for
equals(Object) and compareTo(Capability), but not for isSubsetOf(Capability) and isSupersetOf(Capability). If you are putting them in a map
or set, you probably want to use Capability.SupersetMap or Capability.SupersetSet.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA map whose keys areCapability, and you can quickly retrieve entries which match superset of theCapabilityyou request.static classA set ofCapabilitywhere you can quickly retrieve entries which match superset of theCapabilityyou request. -
Constructor Summary
ConstructorsConstructorDescriptionCapability(String namespace) Capability(String namespace, String key, String value) -
Method Summary
Modifier and TypeMethodDescriptionvoidintbooleaninthashCode()booleanisSubsetOf(Capability other) Order-insignificant matching to determine if this Capability is a subset of its argument.booleanisSubsetOfElementIn(Iterable<Capability> other) booleanisSupersetOf(Capability shorter) Order-insignificant matching to determine if this Capability is a superset of its argument.intsize()toString()
-
Constructor Details
-
Capability
-
Capability
-
-
Method Details
-
add
-
size
public int size() -
compareTo
- Specified by:
compareToin interfaceComparable<Capability>
-
equals
-
hashCode
public int hashCode() -
toString
-
isSubsetOfElementIn
-
isSubsetOf
Order-insignificant matching to determine if this Capability is a subset of its argument. -
isSupersetOf
Order-insignificant matching to determine if this Capability is a superset of its argument. -
getValue
-