Reformat rest of the design patterns - Issue #224
This commit is contained in:
@@ -6,26 +6,26 @@ package com.iluwatar.object.pool;
|
||||
*
|
||||
*/
|
||||
public class Oliphaunt {
|
||||
|
||||
private static int counter = 1;
|
||||
|
||||
private final int id;
|
||||
|
||||
public Oliphaunt() {
|
||||
id = counter++;
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("Oliphaunt id=%d", id);
|
||||
}
|
||||
|
||||
private static int counter = 1;
|
||||
|
||||
private final int id;
|
||||
|
||||
public Oliphaunt() {
|
||||
id = counter++;
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("Oliphaunt id=%d", id);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user