1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package org.basepom.mojo.dvc.dependency;
16
17 import static com.google.common.base.Preconditions.checkNotNull;
18
19 import org.basepom.mojo.dvc.QualifiedName;
20
21 import com.google.common.collect.ImmutableMap;
22 import org.eclipse.aether.graph.DependencyNode;
23
24 public final class DependencyMap {
25
26 private final ImmutableMap<QualifiedName, DependencyNode> allDependencies;
27 private final ImmutableMap<QualifiedName, DependencyNode> directDependencies;
28
29 DependencyMap(final ImmutableMap<QualifiedName, DependencyNode> allDependencies,
30 final ImmutableMap<QualifiedName, DependencyNode> directDependencies) {
31 this.allDependencies = checkNotNull(allDependencies, "allDependencies is null");
32 this.directDependencies = checkNotNull(directDependencies, "directDependencies is null");
33 }
34
35 public ImmutableMap<QualifiedName, DependencyNode> getAllDependencies() {
36 return allDependencies;
37 }
38
39 public ImmutableMap<QualifiedName, DependencyNode> getDirectDependencies() {
40 return directDependencies;
41 }
42 }