From 2f925fb69dfc65bf25870fe89c004a009a73e476 Mon Sep 17 00:00:00 2001 From: liamfallon Date: Thu, 4 Apr 2019 17:27:50 +0000 Subject: Add filters on policy objects I just raised this review to shwo where I'm going with the filters. They are not complete yet. Issue-ID: POLICY-1095 Change-Id: I7b602a32bb67159b893f3b3cefea5d88038c4e5f Signed-off-by: liamfallon --- .../org/onap/policy/models/base/PfObjectFiler.java | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 models-base/src/main/java/org/onap/policy/models/base/PfObjectFiler.java (limited to 'models-base/src/main') diff --git a/models-base/src/main/java/org/onap/policy/models/base/PfObjectFiler.java b/models-base/src/main/java/org/onap/policy/models/base/PfObjectFiler.java new file mode 100644 index 000000000..f1481bf3c --- /dev/null +++ b/models-base/src/main/java/org/onap/policy/models/base/PfObjectFiler.java @@ -0,0 +1,40 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2019 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.models.base; + +import java.util.List; + +/** + * Interface for filtering a list of concepts. + * + * @author Liam Fallon (liam.fallon@est.tech) + */ +@FunctionalInterface +public interface PfObjectFiler { + /** + * Filter an incoming list, removing items that do not match the filter. + * + * @param originalList the original list + * @return the filtered list + */ + public List filter(final List originalList); + +} -- cgit 1.2.3-korg