зеркало из
				https://github.com/iharh/notes.git
				synced 2025-10-31 05:36:08 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			17 строки
		
	
	
		
			436 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			17 строки
		
	
	
		
			436 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| sample
 | |
|     public static class SomeResponseSupplier {
 | |
|         private final Supplier<SomeResponse> supplier;
 | |
|         private TxCardResponse data;
 | |
| 
 | |
|         public SomeResponseSupplier(Supplier<SomeResponse> supplier) {
 | |
|             this.supplier = supplier;
 | |
|         }
 | |
| 
 | |
|         public SomeResponse get() {
 | |
|             if (data != null) {
 | |
|                 return data;
 | |
|             }
 | |
|             return data = supplier.get();
 | |
|         }
 | |
|     }
 | 
