org.apache.felix.bundlerepository.impl

## Class RequirementImpl

- java.lang.Object
- - org.apache.felix.bundlerepository.impl.RequirementImpl

All Implemented Interfaces:
  Requirement

    public class RequirementImpl
    extends java.lang.Object
    implements Requirement

### Constructor Summary

Constructors
Constructor and Description
`RequirementImpl()`
`RequirementImpl(java.lang.String name)`

### Method Summary

Methods
`void` `addText(java.lang.String s)`
`boolean` `equals(java.lang.Object o)`
`java.util.Map<java.lang.String,java.lang.Object>` `getAttributes()` Return a map of attributes.
`java.lang.String` `getComment()`
`java.util.Map<java.lang.String,java.lang.String>` `getDirectives()` Return the map of directives for this requirement.
`java.lang.String` `getFilter()` Return the filter.
`java.lang.String` `getName()` Return the name of the requirement.
`int` `hashCode()`
`boolean` `isExtend()`
`boolean` `isMultiple()`
`boolean` `isOptional()`
`boolean` `isSatisfied(Capability capability)` Check if the given capability satisfied this requirement.
`void` `setAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)`
`void` `setDirectives(java.util.Map<java.lang.String,java.lang.String> directives)`
`void` `setExtend(boolean extend)`
`void` `setFilter(java.lang.String filter)`
`void` `setMultiple(boolean multiple)`
`void` `setName(java.lang.String name)`
`void` `setOptional(boolean optional)`
`java.lang.String` `toString()`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### RequirementImpl

    public RequirementImpl()

#### RequirementImpl

    public RequirementImpl(java.lang.String name)

### Method Detail

#### getAttributes

    public java.util.Map<java.lang.String,java.lang.Object> getAttributes()

Description copied from interface: `Requirement`
Return a map of attributes. Requirements can have attributes, but these are not used for matching. They are for informational purposes only.

Specified by:
  `getAttributes` in interface `Requirement`
Returns:
  The map of attributes.

#### setAttributes

    public void setAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)

#### getDirectives

    public java.util.Map<java.lang.String,java.lang.String> getDirectives()

Description copied from interface: `Requirement`
Return the map of directives for this requirement. This requirements map does *not* contain requirements that are modeled via direct APIs on this interface, such as the filter, cardinality and resolution.

Specified by:
  `getDirectives` in interface `Requirement`
Returns:

#### setDirectives

    public void setDirectives(java.util.Map<java.lang.String,java.lang.String> directives)

#### getName

    public java.lang.String getName()

Description copied from interface: `Requirement`
Return the name of the requirement.

Specified by:
  `getName` in interface `Requirement`

#### setName

    public void setName(java.lang.String name)

#### getFilter

    public java.lang.String getFilter()

Description copied from interface: `Requirement`
Return the filter.

Specified by:
  `getFilter` in interface `Requirement`

#### setFilter

    public void setFilter(java.lang.String filter)

#### isSatisfied

    public boolean isSatisfied(Capability capability)

Description copied from interface: `Requirement`
Check if the given capability satisfied this requirement.

Specified by:
  `isSatisfied` in interface `Requirement`
Parameters:
  `capability` - the capability to check
Returns:
  `true` is the capability satisfies this requirement, `false` otherwise

#### isExtend

    public boolean isExtend()

Specified by:
  `isExtend` in interface `Requirement`

#### setExtend

    public void setExtend(boolean extend)

#### isMultiple

    public boolean isMultiple()

Specified by:
  `isMultiple` in interface `Requirement`

#### setMultiple

    public void setMultiple(boolean multiple)

#### isOptional

    public boolean isOptional()

Specified by:
  `isOptional` in interface `Requirement`

#### setOptional

    public void setOptional(boolean optional)

#### getComment

    public java.lang.String getComment()

Specified by:
  `getComment` in interface `Requirement`

#### addText

    public void addText(java.lang.String s)

#### equals

    public boolean equals(java.lang.Object o)

Overrides:
  `equals` in class `java.lang.Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `java.lang.Object`

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`