Class LicenseMap
java.lang.Object
java.util.AbstractMap<String, SortedSet<org.apache.maven.project.MavenProject>>
java.util.TreeMap<String, SortedSet<org.apache.maven.project.MavenProject>>
org.codehaus.mojo.license.model.LicenseMap
- All Implemented Interfaces:
Serializable, Cloneable, Map<String, SortedSet<org.apache.maven.project.MavenProject>>, NavigableMap<String, SortedSet<org.apache.maven.project.MavenProject>>, SortedMap<String, SortedSet<org.apache.maven.project.MavenProject>>
Map of artifacts (stub in mavenproject) grouped by their license.
keyis the license on which to associate the given project.valuelist of projects belonging to the license.
- Since:
- 1.0
- Author:
- tchemit dev@tchemit.fr
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.LicenseMap(Comparator<org.apache.maven.project.MavenProject> projectComparator) -
Method Summary
Modifier and TypeMethodDescriptionSortedSet<org.apache.maven.project.MavenProject> Store in the license map a project to a given license.voidputAll(LicenseMap licenseMap) Store in the license other licenseMap.removeProject(org.apache.maven.project.MavenProject project) Remove project from all licenses it is mapped to.Build a dependencies map from the license map, this is a map of license for each project registered in the license map.Methods inherited from class TreeMap
ceilingEntry, ceilingKey, clear, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, forEach, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, put, putAll, remove, replace, replace, replaceAll, size, subMap, subMap, tailMap, tailMap, valuesMethods inherited from class AbstractMap
equals, hashCode, isEmpty, toStringMethods inherited from interface Map
compute, computeIfAbsent, computeIfPresent, equals, getOrDefault, hashCode, isEmpty, merge, putIfAbsent, remove
-
Field Details
-
UNKNOWN_LICENSE_MESSAGE
- See Also:
-
-
Constructor Details
-
LicenseMap
public LicenseMap()Default constructor. -
LicenseMap
-
-
Method Details
-
put
public SortedSet<org.apache.maven.project.MavenProject> put(String key, org.apache.maven.project.MavenProject value) Store in the license map a project to a given license.- Parameters:
key- the license on which to associate the given projectvalue- project to register in the license map- Returns:
- the set of projects using the given license
-
putAll
Store in the license other licenseMap.- Parameters:
licenseMap- license map to put
-
toDependencyMap
-
toLicenseMapOrderByName
-
removeProject
-