mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-16 00:59:02 +00:00
docs: update object pool
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
package com.iluwatar.object.pool;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
@@ -35,6 +36,7 @@ public class Oliphaunt {
|
||||
|
||||
private static final AtomicInteger counter = new AtomicInteger(0);
|
||||
|
||||
@Getter
|
||||
private final int id;
|
||||
|
||||
/**
|
||||
@@ -49,10 +51,6 @@ public class Oliphaunt {
|
||||
}
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("Oliphaunt id=%d", id);
|
||||
|
||||
Reference in New Issue
Block a user