Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright (c) OSGi Alliance (2011, 2012). All Rights Reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.osgi.resource;
A resource is the representation of a uniquely identified and typed data. A resource declares requirements that need to be satisfied by capabilities before it can provide its capabilities.

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.

Version:
$Id: 40958d5777ee269d27d58e9f646a4c91bcc6daa4 $
ThreadSafe:
public interface Resource {
Returns the capabilities declared by this resource.

Parameters:
namespace The namespace of the declared capabilities to return or null to return the declared capabilities from all namespaces.
Returns:
An unmodifiable list containing the declared Capabilitys from the specified namespace. The returned list will be empty if this resource declares no capabilities in the specified namespace.
Returns the requirements declared by this bundle resource.

Parameters:
namespace The namespace of the declared requirements to return or null to return the declared requirements from all namespaces.
Returns:
An unmodifiable list containing the declared Requirement s from the specified namespace. The returned list will be empty if this resource declares no requirements in the specified namespace.
Compares this Resource to another Resource.

This Resource is equal to another Resource if both have the same content and come from the same location. Location may be defined as the bundle location if the resource is an installed bundle or the repository location if the resource is in a repository.

Parameters:
obj The object to compare against this Resource.
Returns:
true if this Resource is equal to the other object; false otherwise.
	boolean equals(Object obj);

Returns the hashCode of this Resource.

Returns:
The hashCode of this Resource.
	int hashCode();
New to GrepCode? Check out our FAQ X