com.levigo.util.base
Class SimpleProvider<T,E extends Throwable>
java.lang.Object
com.levigo.util.base.SimpleProvider<T,E>
- All Implemented Interfaces:
- Provider<T,E>
public class SimpleProvider<T,E extends Throwable>
- extends Object
- implements Provider<T,E>
A simple provider providing a single, fixed item.
Constructor Summary |
SimpleProvider(T item)
Create a new provider providing the given item. |
Method Summary |
T |
get()
Provides an instance of T . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleProvider
public SimpleProvider(T item)
- Create a new provider providing the given item.
- Parameters:
item
- the item to provide.
get
public T get()
throws E extends Throwable
- Description copied from interface:
Provider
- Provides an instance of
T
. Must never return null
. Whether this method may be
called more that one time is not specified. Supporting multiple calls is up to the
implementation.
- Specified by:
get
in interface Provider<T,E extends Throwable>
- Returns:
-
- Throws:
E extends Throwable
Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.