Interface RequirementSet

    • Method Detail

      • getRequirement

        @Nullable
        @Nullable Requirement getRequirement​(@NotNull
                                             @NotNull String key,
                                             long ownerId)
        Get a requirement from the set via the key and ownerId.
        Parameters:
        key -
        ownerId -
        Returns:
        requirement
      • addRequirement

        void addRequirement​(@NotNull
                            @NotNull Requirement requirement)
        Adds a requirement to the set.
        Parameters:
        requirement -
      • addAllRequirements

        void addAllRequirements​(Iterable<Requirement> requirements)
        Adds all the specified requirements to the set
        Parameters:
        requirements -
      • removeRequirement

        boolean removeRequirement​(@NotNull
                                  @NotNull ImmutableRequirement requirement)
        Removes the requirement from the set.
        Parameters:
        requirement - to remove
        Returns:
        removed if the requirement was removed
      • removeRequirements

        int removeRequirements​(@NotNull
                               @NotNull com.google.common.base.Predicate<Requirement> requirementPredicate)
        Remove requirements from set if they match the given Predicate
        Parameters:
        requirementPredicate - for requirements to be removed from the current RequirementSet
        Returns:
        count of matching requirements removed
      • removeRequirements

        int removeRequirements​(@NotNull
                               @NotNull Iterable<Requirement> requirements)
        Removes all the specified Requirements from the set.
        Parameters:
        requirements - to remove
        Returns:
        count of matching requirements removed
      • getSystemRequirements

        @NotNull
        @NotNull Set<Requirement> getSystemRequirements​(String type)
        Gets a subset of requirements which are of a particular system type. e.g. system.builder or system.jdk.
        Parameters:
        type -
        Returns:
        requirements