Java 8: use lambdas and function references
[yangtools.git] / common / object-cache-noop / src / main / java / org / opendaylight / yangtools / objcache / impl / StaticObjectCacheBinder.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.yangtools.objcache.impl;
9
10 import org.opendaylight.yangtools.objcache.spi.AbstractObjectCacheBinder;
11 import org.opendaylight.yangtools.objcache.spi.NoopObjectCache;
12
13 public final class StaticObjectCacheBinder extends AbstractObjectCacheBinder {
14     private static final StaticObjectCacheBinder INSTANCE = new StaticObjectCacheBinder();
15
16     private StaticObjectCacheBinder() {
17         super(objClass -> NoopObjectCache.getInstance());
18     }
19
20     public static StaticObjectCacheBinder getInstance() {
21         return INSTANCE;
22     }
23 }