Remove illegal FIXME notes
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / repo / api / SchemaSourceFilter.java
index f881900754a53642d3696bfab3e67e2a47934ac2..cccfc92733e78b5c52536d8224002f0e17a178b2 100644 (file)
@@ -3,39 +3,39 @@
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/eplv10.html
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
 package org.opendaylight.yangtools.yang.model.repo.api;
 
 import com.google.common.annotations.Beta;
-import com.google.common.util.concurrent.Futures;
+import com.google.common.collect.ImmutableList;
+import com.google.common.util.concurrent.FluentFuture;
 import com.google.common.util.concurrent.ListenableFuture;
+import org.eclipse.jdt.annotation.NonNull;
+import org.opendaylight.yangtools.util.concurrent.FluentFutures;
 
-import java.util.Collections;
-
-/*
- * A filter of schema sources. This is used to restrict which sources representation
- * instances are allowed to participate in construction of a schema context. This
- * allows, for example, to create an non-shared island, or require the sources to
- * be certified before use.
+/**
+ * A filter of schema sources. This is used to restrict which sources representation instances are allowed
+ * to participate in construction of a schema context. This allows, for example, to create an non-shared island,
+ * or require the sources to be certified before use.
  */
 @Beta
 public interface SchemaSourceFilter {
     /**
      * A {@link SchemaSourceFilter} which accepts any schema source it is presented with.
      */
-    public static final SchemaSourceFilter ALWAYS_ACCEPT = new SchemaSourceFilter() {
-        private final Iterable<Class<? extends SchemaSourceRepresentation>> REPRESENTATIONS =
-                Collections.<Class<? extends SchemaSourceRepresentation>>singletonList(SchemaSourceRepresentation.class);
+    @NonNull SchemaSourceFilter ALWAYS_ACCEPT = new SchemaSourceFilter() {
+        private final ImmutableList<Class<? extends SchemaSourceRepresentation>> representations =
+                ImmutableList.of(SchemaSourceRepresentation.class);
 
         @Override
-        public Iterable<Class<? extends SchemaSourceRepresentation>> supportedRepresentations() {
-            return REPRESENTATIONS;
+        public ImmutableList<Class<? extends SchemaSourceRepresentation>> supportedRepresentations() {
+            return representations;
         }
 
         @Override
-        public ListenableFuture<Boolean> apply(final SchemaSourceRepresentation schemaSource) {
-            return Futures.immediateFuture(Boolean.TRUE);
+        public FluentFuture<Boolean> apply(final SchemaSourceRepresentation schemaSource) {
+            return FluentFutures.immediateTrueFluentFuture();
         }
     };