You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
470 B
26 lines
470 B
public class Box<T> {
|
|
private T content;
|
|
|
|
public Box() {}
|
|
|
|
public Box(T content) {
|
|
this.content = content;
|
|
}
|
|
|
|
public T getContent() {
|
|
return content;
|
|
}
|
|
|
|
public void setContent(T content) {
|
|
this.content = content;
|
|
}
|
|
|
|
public boolean isEmpty() {
|
|
return content == null;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "Box{" + "content=" + content + '}';
|
|
}
|
|
}
|