@@ -0,0 +1,1885 @@
+/*%0A * Copyright 2016-present Open Networking Laboratory%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.onosproject.store.resource.impl;%0A%0Aimport com.google.common.collect.ImmutableSet;%0Aimport org.onosproject.net.resource.DiscreteResource;%0Aimport org.onosproject.net.resource.DiscreteResourceId;%0A%0Aimport java.util.List;%0Aimport java.util.Optional;%0Aimport java.util.Set;%0A%0A/**%0A * Represents an empty set of discrete resource.%0A */%0Afinal class EmptyDiscreteResources implements DiscreteResources %7B%0A    static final DiscreteResources INSTANCE = new EmptyDiscreteResources();%0A%0A    // for serializer%0A    private EmptyDiscreteResources() %7B%7D%0A%0A    @Override%0A    public Optional%3CDiscreteResource%3E lookup(DiscreteResourceId id) %7B%0A        return Optional.empty();%0A    %7D%0A%0A    @Override%0A    public DiscreteResources difference(DiscreteResources other) %7B%0A        return this;%0A    %7D%0A%0A    @Override%0A    public boolean isEmpty() %7B%0A        return true;%0A    %7D%0A%0A    @Override%0A    public boolean containsAny(List%3CDiscreteResource%3E other) %7B%0A        return false;%0A    %7D%0A%0A    @Override%0A    public DiscreteResources add(DiscreteResources other) %7B%0A        return other;%0A    %7D%0A%0A    @Override%0A    public DiscreteResources remove(List%3CDiscreteResource%3E removed) %7B%0A        return this;%0A    %7D%0A%0A    @Override%0A    public Set%3CDiscreteResource%3E values() %7B%0A        return ImmutableSet.of();%0A    %7D%0A%7D%0A

Add a DiscreteResources sub type representing an empty set