30 lines
		
	
	
		
			612 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
		
		
			
		
	
	
			30 lines
		
	
	
		
			612 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| 
								 | 
							
								@startuml
							 | 
						||
| 
								 | 
							
								package com.iluwatar.object.pool {
							 | 
						||
| 
								 | 
							
								  class App {
							 | 
						||
| 
								 | 
							
								    - LOGGER : Logger {static}
							 | 
						||
| 
								 | 
							
								    + App()
							 | 
						||
| 
								 | 
							
								    + main(args : String[]) {static}
							 | 
						||
| 
								 | 
							
								  }
							 | 
						||
| 
								 | 
							
								  abstract class ObjectPool<T> {
							 | 
						||
| 
								 | 
							
								    - available : Set<T>
							 | 
						||
| 
								 | 
							
								    - inUse : Set<T>
							 | 
						||
| 
								 | 
							
								    + ObjectPool<T>()
							 | 
						||
| 
								 | 
							
								    + checkIn(instance : T)
							 | 
						||
| 
								 | 
							
								    + checkOut() : T
							 | 
						||
| 
								 | 
							
								    # create() : T {abstract}
							 | 
						||
| 
								 | 
							
								    + toString() : String
							 | 
						||
| 
								 | 
							
								  }
							 | 
						||
| 
								 | 
							
								  class Oliphaunt {
							 | 
						||
| 
								 | 
							
								    - counter : AtomicInteger {static}
							 | 
						||
| 
								 | 
							
								    - id : int
							 | 
						||
| 
								 | 
							
								    + Oliphaunt()
							 | 
						||
| 
								 | 
							
								    + getId() : int
							 | 
						||
| 
								 | 
							
								    + toString() : String
							 | 
						||
| 
								 | 
							
								  }
							 | 
						||
| 
								 | 
							
								  class OliphauntPool {
							 | 
						||
| 
								 | 
							
								    + OliphauntPool()
							 | 
						||
| 
								 | 
							
								    # create() : Oliphaunt
							 | 
						||
| 
								 | 
							
								  }
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								OliphauntPool --|> ObjectPool 
							 | 
						||
| 
								 | 
							
								@enduml
							 |