Repository: incubator-tamaya-extensions Updated Branches: refs/heads/master 0c9dc212e -> 4d01f9093
TAMAYA-194: Factored out ConfiguredItemSupplier, replacing it with Supplier from the functs modul for impl and commented out the methods in the API to avoid deps until Java 8 is available (which has a supplier in the util.function package). Fixed checkstyle issues. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/commit/4d01f909 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/tree/4d01f909 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/diff/4d01f909 Branch: refs/heads/master Commit: 4d01f9093266902e92a7d8f55954180e39d9d5d0 Parents: 0c9dc21 Author: anatole <[email protected]> Authored: Sat Nov 12 01:34:10 2016 +0100 Committer: anatole <[email protected]> Committed: Sat Nov 12 01:34:10 2016 +0100 ---------------------------------------------------------------------- .../org/apache/tamaya/functions/Supplier.java | 41 ++++++++++++++++++++ 1 file changed, 41 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/4d01f909/modules/functions/src/main/java/org/apache/tamaya/functions/Supplier.java ---------------------------------------------------------------------- diff --git a/modules/functions/src/main/java/org/apache/tamaya/functions/Supplier.java b/modules/functions/src/main/java/org/apache/tamaya/functions/Supplier.java new file mode 100644 index 0000000..e32a266 --- /dev/null +++ b/modules/functions/src/main/java/org/apache/tamaya/functions/Supplier.java @@ -0,0 +1,41 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ +package org.apache.tamaya.functions; + +/** + * Represents a supplier of results. + * + * There is no requirement that a new or distinct result be returned each + * time the supplier is invoked. + * + * This is a functional interface, + * whose functional method is {@link #get()}. + * + * @param <T> the type of results supplied by this supplier + */ +//@FunctionalInterface +public interface Supplier<T> { + + /** + * Gets a result. + * + * @return a result + */ + T get(); +}
