File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
application-core/src/main/java/ru/art/core/lazy Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 1
1
package ru .art .core .lazy ;
2
2
3
- import lombok .AllArgsConstructor ;
4
- import lombok .RequiredArgsConstructor ;
5
- import static java .util .Objects .nonNull ;
6
- import java .util .concurrent .atomic .AtomicReference ;
7
- import java .util .concurrent .locks .ReentrantLock ;
8
- import java .util .function .Supplier ;
3
+ import lombok .*;
4
+ import static java .util .Objects .*;
5
+ import java .util .concurrent .atomic .*;
6
+ import java .util .concurrent .locks .*;
7
+ import java .util .function .*;
9
8
10
9
@ RequiredArgsConstructor
11
- @ AllArgsConstructor
12
10
public class LazyLoadingValue <T > {
13
11
private final ReentrantLock lock = new ReentrantLock ();
14
- private final Supplier <T > loader ;
15
12
private final AtomicReference <T > value = new AtomicReference <>();
13
+ private final Supplier <T > loader ;
16
14
17
15
public T value () {
18
16
T value ;
You can’t perform that action at this time.
0 commit comments