接口 Requirement

  • 所有已知子接口:
    BundleRequirement
    所有已知实现类:
    BundleRequirementImpl, WrappedRequirement

    @ConsumerType
    public interface Requirement
    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.

    作者:
    $Id: 252221aeaaf9b189eef6e0c3798d0076a0032242 $
    • 方法概要

      所有方法 实例方法 抽象方法 
      修饰符和类型 方法 说明
      boolean equals​(java.lang.Object obj)
      Compares this Requirement to another Requirement.
      java.util.Map<java.lang.String,​java.lang.Object> getAttributes()
      Returns the attributes of this requirement.
      java.util.Map<java.lang.String,​java.lang.String> getDirectives()
      Returns the directives of this requirement.
      java.lang.String getNamespace()
      Returns the namespace of this requirement.
      Resource getResource()
      Returns the resource declaring this requirement.
      int hashCode()
      Returns the hashCode of this Requirement.
    • 方法详细资料

      • getNamespace

        java.lang.String getNamespace()
        Returns the namespace of this requirement.
        返回:
        The namespace of this requirement.
      • getDirectives

        java.util.Map<java.lang.String,​java.lang.String> getDirectives()
        Returns the directives of this requirement.
        返回:
        An unmodifiable map of directive names to directive values for this requirement, or an empty map if this requirement has no directives.
      • getAttributes

        java.util.Map<java.lang.String,​java.lang.Object> getAttributes()
        Returns the attributes of this requirement.

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

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

        Resource getResource()
        Returns the resource declaring this requirement.
        返回:
        The resource declaring this requirement. This can be null if this requirement is synthesized.
      • equals

        boolean equals​(java.lang.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.

        覆盖:
        equals 在类中 java.lang.Object
        参数:
        obj - The object to compare against this Requirement.
        返回:
        true if this Requirement is equal to the other object; false otherwise.
      • hashCode

        int hashCode()
        Returns the hashCode of this Requirement.
        覆盖:
        hashCode 在类中 java.lang.Object
        返回:
        The hashCode of this Requirement.