Package org.apache.ivy.core.sort
Class CollectionOfModulesToSort
java.lang.Object
org.apache.ivy.core.sort.CollectionOfModulesToSort
- All Implemented Interfaces:
Iterable<ModuleInSort>
Wrap a collection of descriptors wrapped themselves in ModuleInSort elements. It contains some
dedicated function to retrieve module descriptors based on dependencies descriptors.
This class is designed to be used internally by the ModuleDescriptorSorter.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<ModuleInSort>
private final Map<ModuleId,
Collection<ModuleInSort>> private final NonMatchingVersionReporter
private final VersionMatcher
-
Constructor Summary
ConstructorsConstructorDescriptionCollectionOfModulesToSort
(Collection<ModuleDescriptor> modulesToSort, VersionMatcher matcher, NonMatchingVersionReporter nonMatchingVersionReporter) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addToModulesByModuleId
(ModuleDescriptor md, ModuleInSort mdInSort) getModuleDescriptorDependency
(DependencyDescriptor descriptor) Find a matching module descriptor in the list of module to sort.iterator()
int
size()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
moduleDescriptors
-
versionMatcher
-
modulesByModuleId
-
nonMatchingVersionReporter
-
-
Constructor Details
-
CollectionOfModulesToSort
public CollectionOfModulesToSort(Collection<ModuleDescriptor> modulesToSort, VersionMatcher matcher, NonMatchingVersionReporter nonMatchingVersionReporter) - Parameters:
modulesToSort
- The collection of ModuleDescriptor to sortmatcher
- The matcher to used to check if dependencyDescriptor match a module in this collectionnonMatchingVersionReporter
- ditto
-
-
Method Details
-
addToModulesByModuleId
-
iterator
- Specified by:
iterator
in interfaceIterable<ModuleInSort>
-
size
public int size() -
getModuleDescriptorDependency
Find a matching module descriptor in the list of module to sort.- Parameters:
descriptor
- ditto- Returns:
- a ModuleDescriptor from the collection of module descriptors to sort. If none exists returns null.
-