2 * Copyright (C) 2019 Bell Canada. All rights reserved.
4 * NOTICE: All the intellectual and technical concepts contained herein are
5 * proprietary to Bell Canada and are protected by trade secret or copyright law.
6 * Unauthorized copying of this file, via any medium is strictly prohibited.
8 package org.onap.ccsdk.cds.sdclistener.util;
10 import java.util.function.Consumer;
13 * A generic builder for constructing an object.
15 * @param <T> - Any object
17 public class BuilderUtil<T> {
19 private final T object;
21 public BuilderUtil(T instance) {
22 this.object = instance;
25 public BuilderUtil<T> build(Consumer<T> consumer) {
26 consumer.accept(object);