Top Description Methods
org.osgi.resource

public Interface Requirement

Known Direct Subinterfaces
org.osgi.framework.wiring.BundleRequirement
Annotations
@ConsumerType
Imports
java.util.Map, org.osgi.annotation.versioning.ConsumerType

A requirement 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: 252221aeaaf9b189eef6e0c3798d0076a0032242 $

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

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

Compares this Requirement to another Requirement.

public Map<String, Object>

Returns:

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

Returns the attributes of this requirement.

public Map<String, String>

Returns:

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

Returns the directives of this requirement.

public String

Returns:

The namespace of this requirement.
getNamespace
()

Returns the namespace of this requirement.

public Resource

Returns:

The resource declaring this requirement. This can be null if this requirement is synthesized.
getResource
()

Returns the resource declaring this requirement.

public int

Returns:

The hashCode of this Requirement.
hashCode
()

Returns the hashCode of this Requirement.

Method Detail

equalsback to summary
public boolean equals(Object obj)

Compares this Requirement to another Requirement.

This Requirement is equal to another Requirement 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 Requirement.

Returns:boolean

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

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

Returns the attributes of this requirement.

Requirement attributes have no specified semantics and are considered extra user defined information.

Returns:Map<String, Object>

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

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

Returns the directives of this requirement.

Returns:Map<String, String>

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

getNamespaceback to summary
public String getNamespace()

Returns the namespace of this requirement.

Returns:String

The namespace of this requirement.

getResourceback to summary
public Resource getResource()

Returns the resource declaring this requirement.

Returns:Resource

The resource declaring this requirement. This can be null if this requirement is synthesized.

hashCodeback to summary
public int hashCode()

Returns the hashCode of this Requirement.

Returns:int

The hashCode of this Requirement.