org.osgi.service.indexer.Requirement Maven / Gradle / Ivy
package org.osgi.service.indexer;
import java.util.Collections;
import java.util.Map;
/**
* A requirement
*/
public final class Requirement {
/** the namespace */
private final String namespace;
/** the attributes */
private final Map attributes;
/** the directives */
private final Map directives;
/**
* Constructor
*
* @param namespace the namespace
* @param attributes the attributes
* @param directives the directives
*/
Requirement(String namespace, Map attributes, Map directives) {
this.namespace = namespace;
this.attributes = attributes;
this.directives = directives;
}
/**
* @return the namespace
*/
public String getNamespace() {
return namespace;
}
/**
* @return the attributes
*/
public Map getAttributes() {
return Collections.unmodifiableMap(attributes);
}
/**
* @return the directives
*/
public Map getDirectives() {
return Collections.unmodifiableMap(directives);
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("Requirement [namespace=")
.append(namespace)
.append(", attributes=")
.append(attributes)
.append(", directives=")
.append(directives)
.append("]");
return builder.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy