Unit tests for some Intent objects and compilers
Unit tests for HostToHost and MultiPointToSinglePoint intents
and intent compilers.
Made Intent classes final to make them immutable.
diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/LinkCollectionIntent.java b/core/api/src/main/java/org/onlab/onos/net/intent/LinkCollectionIntent.java
index 78c95cf..9d0fde8 100644
--- a/core/api/src/main/java/org/onlab/onos/net/intent/LinkCollectionIntent.java
+++ b/core/api/src/main/java/org/onlab/onos/net/intent/LinkCollectionIntent.java
@@ -14,7 +14,7 @@
* Abstraction of a connectivity intent that is implemented by a set of path
* segments.
*/
-public class LinkCollectionIntent extends ConnectivityIntent implements InstallableIntent {
+public final class LinkCollectionIntent extends ConnectivityIntent implements InstallableIntent {
private final Set<Link> links;
@@ -46,6 +46,12 @@
return links;
}
+ /**
+ * Returns the set of links that represent the network connections needed
+ * by this intent.
+ *
+ * @return Set of links for the network hops needed by this intent
+ */
public Set<Link> links() {
return links;
}