Simplify expression and statement

Change-Id: I66cc2bee3a929108c7b4451b3d64c9aac4dcf5d6
diff --git a/core/api/src/main/java/org/onosproject/net/intent/constraint/BooleanConstraint.java b/core/api/src/main/java/org/onosproject/net/intent/constraint/BooleanConstraint.java
index f1d4ad9..b644692 100644
--- a/core/api/src/main/java/org/onosproject/net/intent/constraint/BooleanConstraint.java
+++ b/core/api/src/main/java/org/onosproject/net/intent/constraint/BooleanConstraint.java
@@ -53,12 +53,8 @@
 
     @Override
     public boolean validate(Path path, LinkResourceService resourceService) {
-        for (Link link : path.links()) {
-            if (!isValid(link, resourceService)) {
-                return false;
-            }
-        }
-        return true;
+        return path.links().stream()
+                .allMatch(link -> isValid(link, resourceService));
     }
 
 }
diff --git a/core/api/src/main/java/org/onosproject/net/intent/constraint/LinkTypeConstraint.java b/core/api/src/main/java/org/onosproject/net/intent/constraint/LinkTypeConstraint.java
index ffa4405..fae76d6 100644
--- a/core/api/src/main/java/org/onosproject/net/intent/constraint/LinkTypeConstraint.java
+++ b/core/api/src/main/java/org/onosproject/net/intent/constraint/LinkTypeConstraint.java
@@ -60,7 +60,7 @@
     @Override
     public boolean isValid(Link link, LinkResourceService resourceService) {
         boolean contains = types.contains(link.type());
-        return isInclusive ? contains : !contains;
+        return isInclusive == contains;
     }
 
     /**