Package com.nimbusds.jose.util
Class Container<T>
java.lang.Object
com.nimbusds.jose.util.Container<T>
- Type Parameters:
T
- the type of the item in this container.
Generic container of items of any type.
This class is not thread-safe, if thread safety is required it should be done externally to the class.
The author believes he borrowed the idea for such a class many years ago from a man called Boris Karadjov.
- Version:
- 2016-10-13
- Author:
- Dimitar A. Stoikov
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Container
public Container()Creates a new container with no item. -
Container
Creates a new container with the specified item.- Parameters:
item
- The item, may benull
.
-
-
Method Details
-
get
Gets the contained item.- Returns:
- The item,
null
if none.
-
set
Sets the contained item.- Parameters:
item
- The item, may benull
.
-