Top Description Methods
org.osgi.resource

public Interface Capability

Annotations
@ConsumerType
Imports
java.util.Map, org.osgi.annotation.versioning.ConsumerType

A capability that has been declared from a Resource.

Instances of this type must be effectively immutable. That is, for a given instance of this interface, the methods defined by this interface must always return the same result.

Author
$Id: 4c1f7f4309b23e7cf345c784ed096a2d9bd80467 $

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if this Capability is equal to the other object; false otherwise.
equals
(Object
The object to compare against this Capability.
obj
)

Compares this Capability to another Capability.

public Map<String, Object>

Returns:

An unmodifiable map of attribute names to attribute values for this capability, or an empty map if this capability has no attributes.
getAttributes
()

Returns the attributes of this capability.

public Map<String, String>

Returns:

An unmodifiable map of directive names to directive values for this capability, or an empty map if this capability has no directives.
getDirectives
()

Returns the directives of this capability.

public String

Returns:

The namespace of this capability.
getNamespace
()

Returns the namespace of this capability.

public Resource

Returns:

The resource declaring this capability.
getResource
()

Returns the resource declaring this capability.

public int

Returns:

The hashCode of this Capability.
hashCode
()

Returns the hashCode of this Capability.

Method Detail

equalsback to summary
public boolean equals(Object obj)

Compares this Capability to another Capability.

This Capability is equal to another Capability if they have the same namespace, directives and attributes and are declared by the same resource.

Parameters
obj:Object

The object to compare against this Capability.

Returns:boolean

true if this Capability is equal to the other object; false otherwise.

Annotations
@Override
getAttributesback to summary
public Map<String, Object> getAttributes()

Returns the attributes of this capability.

Returns:Map<String, Object>

An unmodifiable map of attribute names to attribute values for this capability, or an empty map if this capability has no attributes.

getDirectivesback to summary
public Map<String, String> getDirectives()

Returns the directives of this capability.

Returns:Map<String, String>

An unmodifiable map of directive names to directive values for this capability, or an empty map if this capability has no directives.

getNamespaceback to summary
public String getNamespace()

Returns the namespace of this capability.

Returns:String

The namespace of this capability.

getResourceback to summary
public Resource getResource()

Returns the resource declaring this capability.

Returns:Resource

The resource declaring this capability.

hashCodeback to summary
public int hashCode()

Returns the hashCode of this Capability.

Returns:int

The hashCode of this Capability.

Annotations
@Override