org.apache.felix.utils.resource

## Class ResourceImpl

- java.lang.Object
- - org.apache.felix.utils.resource.ResourceImpl

All Implemented Interfaces:
  org.osgi.resource.Resource

    public class ResourceImpl
    extends Object
    implements org.osgi.resource.Resource

### Field Summary

Fields
`protected List<org.osgi.resource.Capability>` `caps`
`protected List<org.osgi.resource.Requirement>` `reqs`

### Constructor Summary

Constructors
Constructor and Description
`ResourceImpl()` CAUTION: This constructor does not ensure that the resource has the required identity capability
`ResourceImpl(String name, String type, org.osgi.framework.Version version)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addCapabilities(Collection<? extends org.osgi.resource.Capability> capabilities)`
`void` `addCapability(org.osgi.resource.Capability capability)`
`void` `addRequirement(org.osgi.resource.Requirement requirement)`
`void` `addRequirements(Collection<? extends org.osgi.resource.Requirement> requirements)`
`boolean` `equals(Object o)`
`List<org.osgi.resource.Capability>` `getCapabilities(String namespace)`
`List<org.osgi.resource.Requirement>` `getRequirements(String namespace)`
`int` `hashCode()`
`String` `toString()`

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

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

### Field Detail

#### caps

    protected final List<org.osgi.resource.Capability> caps

#### reqs

    protected final List<org.osgi.resource.Requirement> reqs

### Constructor Detail

#### ResourceImpl

    public ResourceImpl()

CAUTION: This constructor does not ensure that the resource has the required identity capability

#### ResourceImpl

    public ResourceImpl(String name,
                        String type,
                        org.osgi.framework.Version version)

### Method Detail

#### addCapability

    public void addCapability(org.osgi.resource.Capability capability)

#### addCapabilities

    public void addCapabilities(Collection<? extends org.osgi.resource.Capability> capabilities)

#### addRequirement

    public void addRequirement(org.osgi.resource.Requirement requirement)

#### addRequirements

    public void addRequirements(Collection<? extends org.osgi.resource.Requirement> requirements)

#### getCapabilities

    public List<org.osgi.resource.Capability> getCapabilities(String namespace)

Specified by:
  `getCapabilities` in interface `org.osgi.resource.Resource`

#### getRequirements

    public List<org.osgi.resource.Requirement> getRequirements(String namespace)

Specified by:
  `getRequirements` in interface `org.osgi.resource.Resource`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### equals

    public boolean equals(Object o)

Specified by:
  `equals` in interface `org.osgi.resource.Resource`
Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Specified by:
  `hashCode` in interface `org.osgi.resource.Resource`
Overrides:
  `hashCode` in class `Object`