T
- the type of the item in this container.@NotThreadSafe public class Container<T> extends Object
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.
Constructor and Description |
---|
Container()
Creates a new container with no item.
|
Container(T item)
Creates a new container with the specified item.
|
Modifier and Type | Method and Description |
---|---|
T |
get()
Gets the contained item.
|
void |
set(T item)
Sets the contained item.
|
public Container()
Copyright © 2020 Connect2id Ltd.. All rights reserved.