Last change
on this file since 193 was
193,
checked in by Maciej Komosinski, 10 years ago
|
Set svn:eol-style native for all textual files
|
-
Property svn:eol-style set to
native
|
File size:
453 bytes
|
Line | |
---|
1 | package com.framsticks.util.lang; |
---|
2 | |
---|
3 | public class Holder<T> { |
---|
4 | |
---|
5 | protected T value; |
---|
6 | |
---|
7 | |
---|
8 | /** |
---|
9 | * |
---|
10 | */ |
---|
11 | public Holder() { |
---|
12 | } |
---|
13 | |
---|
14 | /** |
---|
15 | * @param value |
---|
16 | */ |
---|
17 | public Holder(T value) { |
---|
18 | this.value = value; |
---|
19 | } |
---|
20 | |
---|
21 | /** |
---|
22 | * @return the value |
---|
23 | */ |
---|
24 | public T get() { |
---|
25 | return value; |
---|
26 | } |
---|
27 | |
---|
28 | /** |
---|
29 | * @param value the value to set |
---|
30 | */ |
---|
31 | public void set(T value) { |
---|
32 | this.value = value; |
---|
33 | } |
---|
34 | |
---|
35 | public static <T2> Holder<T2> make(T2 value) { |
---|
36 | return new Holder<T2>(value); |
---|
37 | } |
---|
38 | |
---|
39 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.